ge all you need to do is figure out how to do each step
one at a time. You might not know how to list the contents of a directory
in your language of choice (in this case Perl) but that is easy enough to
look up. The same for finding the attributes associated with a file, again
this is easy en
I code but my logic is weak, i code 1000 lines of code but I don't
understand the logic of the program. Can write 10 lines of code, get the
result but I don't understand the concept.
Can code the program but I can't interpret. My mentor told me: understand
the concept because I talk nonsense.
--
On Sat, 2024-01-13 at 22:53 +, Tim Lewis via beginners wrote:
> To send email to text for the main carriers in the US:
> AT&T
> Compose a new email and enter the recipient's 10-digit wireless number,
> followed by @txt.att.net.
> T-Mobile
> Write a new email message.
> Enter the recipients T-M
If you go the e-mail route for signalling, you can have Perl scripts on
both ends using Crypt::OpenPGP to sign and/or encrypt the commands.
Other options like XMPP were mentioned. Maybe one of the MQTT modules
would be suitable.
/Lars
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
On Sat, 2024-01-13 at 17:09 +, Tim Lewis via beginners wrote:
> You bring an excellent point about the ability to spoof the email address.
> In my case the email that for the server is not made public, but that is a
> vulnerability. I will have to read up on pwgen. That sounds like a good
>
On Sat, 2024-01-13 at 08:49 -0600, twlewis via beginners wrote:
> Hi hw, I had a similar situation in which I travelled. I wanted to
> lock down the ufw firewall but be able to allow certain IP addresses
> based on the hotel IP or my cell service IP. To that I developed
> Perl that would check my
On Sat, 2024-01-13 at 10:24 +0530, Andinus via beginners wrote:
> hw @ 2024-01-12 18:49 +01:
>
> > Thanks, I thought about sudo and figured it needs a password being
> > entered. If that works without, I'll start programming and test if
> > something else gets in the way :)
>
> You can configure
;hw"
Sent: Friday, January 12, 2024 7:16am
To: "Perl Beginners"
Subject: How to reboot?
Hi,
I would like to write a program (daemon) which will be automatically
started by systemd at boot which will allow me to reboot or restart my
computer through commands sent via xmpp. The xm
hw @ 2024-01-12 18:49 +01:
> Thanks, I thought about sudo and figured it needs a password being
> entered. If that works without, I'll start programming and test if
> something else gets in the way :)
You can configure sudo to not ask for a password.
--
To unsubscribe, e-mail: beginners-unsubs
On Fri, 2024-01-12 at 21:39 +0530, Andinus via beginners wrote:
> hw @ 2024-01-12 14:16 +01:
>
> > But how can I reboot/restart the computer from the xmpp client? I
> > don't want the xmpp client to run as root all the time. I would use
> > something like
> >
> >
> > system('shutdown', '-r', '
hw @ 2024-01-12 14:16 +01:
> But how can I reboot/restart the computer from the xmpp client? I
> don't want the xmpp client to run as root all the time. I would use
> something like
>
>
> system('shutdown', '-r', 'now');
>
>
> in the xmpp client, and that does require root privileges. To make
>
Hi,
I would like to write a program (daemon) which will be automatically
started by systemd at boot which will allow me to reboot or restart my
computer through commands sent via xmpp. The xmpp part (xmpp client)
and starting that program is no problem.
But how can I reboot/restart the computer
create
> >
> >
> > Being that you barely know anything about Perl, you should start
> > with
> > learning how Perl works by reading Modern Perl and Ovid's Beginning
> > Perl.
> >
> > Right now you're doing the moral equivalent of askin
I agree. Roadmap is good. I even gave him a
starting roadmap, but I think he is just looking
for the answer. Which means he is going to be
disappointed for sure.
Mike
On 8/2/22 03:41, Ruprecht Helms (privat) wrote:
for bigger developing-project the best thing is a roadmap, because
For PDF related development one valuable resource is
https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/pdfreference1.7old.pdf
I don’t have any experience in this but investigated many years ago to automate
digital publication. Maybe it will help. I’m sure Perl can be applied but as
Beginning Perl.*
*Right now you're doing the moral equivalent of asking how to draw Mona
Lisa's eye when you don't even know which end of a paint brush paints.*
A roadmap is like a guide but I am too following your advice.
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.
??
> >
> >
> >
> > for bigger developing-project the best thing is a roadmap, because you
> > have to plan the steps
> > what the thing should do.
> >
> > Start with a sheet of paper and a pencil and after that you can decide
>
Hi everybody,
Am 02.08.22 um 11:16 schrieb Christian Walde:
On Tue, 02 Aug 2022 10:41:36 +0200, Ruprecht Helms (privat)
wrote:
Am 02.08.22 um 10:07 schrieb Christian Walde:
What you're describing is how to make a roadmap for the implementation
of a specific program.
William asked
ave to plan the steps
what the thing should do.
Start with a sheet of paper and a pencil and after that you can decide
what programminglanguage
to use and which module you want to start first.
What you're describing is how to make a roadmap for the implementation of a
specific program.
Wil
for bigger developing-project the best thing is a roadmap, because you
have to plan the steps
what the thing should do.
Start with a sheet of paper and a pencil and after that you can decide
what programminglanguage
to use and which module you want to start first.
Regards,
Ruprecht
A
On Mon, 01 Aug 2022 22:50:21 +0200, William Torrez Corea
wrote:
On Mon, Aug 1, 2022 at 8:16 AM Christian Walde
wrote:
On Sat, 23 Jul 2022 21:03:18 +0200, William Torrez Corea <
willitc9...@gmail.com> wrote:
My goal: I want to create
you should start [...] reading Modern Perl and Ovid's
I want to create
> >
> >
> > Being that you barely know anything about Perl, you should start with
> > learning how Perl works by reading Modern Perl and Ovid's Beginning Perl.
> >
> > Right now you're doing the moral equivalent of asking how t
w Perl works by reading Modern Perl and Ovid's Beginning Perl.
>
> Right now you're doing the moral equivalent of asking how to draw Mona
> Lisa's eye when you don't even know which end of a paint brush paints.
>
> --
> With regards,
> Christian Walde
>
of asking how to draw Mona Lisa's
eye when you don't even know which end of a paint brush paints.
--
With regards,
Christian Walde
Hi,
I know eclipse as a developingtool that is normaly used for
Java-development.
But this tool also have plugins for developing in PHP, for
Android-Programming
and maybe for development in perl or in python.
Regards,
Ruprecht
Am 01.08.22 um 13:23 schrieb hw:
I have installed eclipse on my
On Sun, 2022-07-31 at 21:06 -0600, William Torrez Corea wrote:
> On Sun, Jul 31, 2022 at 8:55 PM hw wrote:
>
> > On Sun, 2022-07-31 at 18:04 -0600, William Torrez Corea wrote:
> > > On Sun, Jul 31, 2022 at 5:57 PM Marco Shaw
> > > wrote:
> > >
> > > > Being a novice, you have to realize there a
On Sun, Jul 31, 2022 at 8:55 PM hw wrote:
> On Sun, 2022-07-31 at 18:04 -0600, William Torrez Corea wrote:
> > On Sun, Jul 31, 2022 at 5:57 PM Marco Shaw
> > wrote:
> >
> > > Being a novice, you have to realize there are certain limitations
> > > to
> > > things. In other words, Perl maybe can'
On Sun, 2022-07-31 at 18:04 -0600, William Torrez Corea wrote:
> On Sun, Jul 31, 2022 at 5:57 PM Marco Shaw
> wrote:
>
> > Being a novice, you have to realize there are certain limitations
> > to
> > things. In other words, Perl maybe can't do EVERYTHING you want it
> > to.
> >
>
> Very clear,
On Sun, Jul 31, 2022 at 5:57 PM Marco Shaw wrote:
> Being a novice, you have to realize there are certain limitations to
> things. In other words, Perl maybe can't do EVERYTHING you want it to.
>
Very clear, so, would I use another language of programming to make the
rest of the program?.
--
On Sun, 2022-07-31 at 17:34 -0600, William Torrez Corea wrote:
> Where can I start?
>
> I am Script kiddie, I have zero knowledge about Perl. I need a
> stimulus.
>
> For example: I am executing perl examples.
>
> But the project i don't know how to start.
>
&
ipt kiddie, I have zero knowledge about Perl. I need a stimulus.
>
> For example: I am executing perl examples.
>
> But the project i don't know how to start.
>
> https://learn.perl.org/
>
Where can I start?
I am Script kiddie, I have zero knowledge about Perl. I need a stimulus.
For example: I am executing perl examples.
But the project i don't know how to start.
https://learn.perl.org/
Well, what can you do with your bare hands? Build tools so you can do
stuff, starting with using stones and the like for tools?
On Fri, 2022-07-29 at 13:26 -0600, William Torrez Corea wrote:
> On Fri, Jul 29, 2022 at 11:38 AM hw wrote:
>
> > On Sat, 2022-07-23 at 13:03 -0600, William Torrez
On Fri, Jul 29, 2022 at 11:38 AM hw wrote:
> On Sat, 2022-07-23 at 13:03 -0600, William Torrez Corea wrote:
> > My goal: I want to create something similar to the phone guide. In
> > this
> > page exist a great number of documents in format pdf. So, I want to
> > unite
> > the different documents
On Sat, 2022-07-23 at 13:03 -0600, William Torrez Corea wrote:
> My goal: I want to create something similar to the phone guide. In
> this
> page exist a great number of documents in format pdf. So, I want to
> unite
> the different documents and can filter for name, last name, location.
> If I
> m
My goal: I want to create something similar to the phone guide. In this
page exist a great number of documents in format pdf. So, I want to unite
the different documents and can filter for name, last name, location. If I
make this manually I have to open each document, download the document and
sea
I'm going to be traveling, so will not be able to help much
in the next 2 days.
That is a PDF file you supplied. Is it fair to say you want to
be able to search for all the names listed in a text file and be
able to print out which file contains which name. And in some
cases the name will not
The url of the page:
https://www.pgr.gob.ni/PDF/2021/GACETA/GACETA_17_08_2021.pdf
On 7/20/22, William Torrez Corea wrote:
> Exist a page where you put info about the person but if you want to search
> a name you must search this manually. So, I want to automate this process
> with perl.
> --
>
>
Exist a page where you put info about the person but if you want to search
a name you must search this manually. So, I want to automate this process
with perl.
--
With kindest regards, William.
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄
Hi Jeffrey,
On Tue, 28 Jan 2020 01:02:46 -0500
Jeffrey Walton wrote:
> Hi Everyone,
>
> I regression test on old machines. The older machines need an updated
> Git, SSH and Wget. To update Git, SSH and Wget I need to build a lot
> of dependent software. Perl is one of them.
>
> On Fedora 1 whi
On Tue, Jan 28, 2020 at 3:02 AM Shlomi Fish wrote:
>
> ...
> >
> > On Fedora 1 while trying to build Perl 5.10.1:
> >
>
> perl 5.10.1 is very old and no longer maintained (see what I wrote at
> https://github.com/shlomif/supporting-older-perl5-releases ), but OTOH so is
> Fedora 1.
Yeah, this is
Hi Everyone,
I regression test on old machines. The older machines need an updated
Git, SSH and Wget. To update Git, SSH and Wget I need to build a lot
of dependent software. Perl is one of them.
On Fedora 1 while trying to build Perl 5.10.1:
I've tried to compile and run the following simple p
ere is the "die" statement, for example,
> >
> > connect(...) or die $!;
> >
> > Then my main program will die follow up this "die".
> > But I don't want the caller to die even if "die" was happened in the
> > module.
> > How t
Hi all,
Try::Tiny seems work fine to me. thanks.
在 2019/8/8 14:19, Shlomi Fish 写道:
You can create a signal handler for die and handle the exception in there.
Referhttps://users.cs.cf.ac.uk/Dave.Marshall/PERL/node116.html
Also see block eval -https://perldoc.pl/functions/eval - or one of its
...) or die $!;
>>
>> Then my main program will die follow up this "die".
>> But I don't want the caller to die even if "die" was happened in the
>> module.
>> How to handle with it?
>>
>> Thank you.
>> Eliza
>>
statement, for example,
>
> connect(...) or die $!;
>
> Then my main program will die follow up this "die".
> But I don't want the caller to die even if "die" was happened in the
> module.
> How to handle with it?
>
> Thank you.
> Eliza
>
Hello,
I use such a module from other people.
In this module there is the "die" statement, for example,
connect(...) or die $!;
Then my main program will die follow up this "die".
But I don't want the caller to die even if "die" was happened in the module
On 12/26/18 7:31 AM, Mike Martin wrote:
Any ideas how to test for the existance of a file, when the file name
contains extended ascii characters
For example if the file contains emdash (U-2014) file -e always
returns false
-e should not be looking at the filename directly. it checks if
I created a file whose name is just an emdash in bash with
$ printf '\xe2\x80\x94'
and this seems to work here (linux):
my $fname = "\xe2\x80\x94";
if (-e "$fname") {
print "exists\n"
}
On 2018-12-26 12:31:24, Mike Martin wrote:
> Any ideas ho
Any ideas how to test for the existance of a file, when the file name
contains extended ascii characters
For example if the file contains emdash (U-2014) file -e always returns
false
thanks
Mike
Hi,
how can I get my program to send a file via xmpp? Sending and receiving
messages with Net::XMPP works fine, yet base64-encoding the files to
send them as messages isn't really an option because there would be too
many clients unable to decode them.
--
To unsubscribe, e-mail: beginners
ailto:jimsgib...@gmail.com>> wrote:
(Please reply to the list.)
If you have written code that extracts the date and time from the ‘LOG flle
opened’ lines in the log file, then please show us your code. You seem to be
asking other people to write your program for you. You will get better he
0-22 10:21:25
> Install patch2 - correct solution *
>
>
>
>
>
> On Thu, Oct 25, 2018 at 6:56 PM Jim Gibson wrote:
>
>> (Please reply to the list.)
>>
>> If you have written code that extracts the date and time from the ‘LOG
>> flle opened’ lines in th
On Thu, Oct 25, 2018 at 6:56 PM Jim Gibson wrote:
> (Please reply to the list.)
>
> If you have written code that extracts the date and time from the ‘LOG
> flle opened’ lines in the log file, then please show us your code. You seem
> to be asking other people to write your program
to solve these problems yourself.
Anyone wishing to get help from a forum such as beginners@perl.org would do
well to read this website on how to ask smart questions:
<http://www.catb.org/~esr/faqs/smart-questions.html>
Now, to address your problem:
If you have a starting time and an
> On Oct 24, 2018, at 9:54 PM, Asad wrote:
>
> Thank all now I am able to progress :
>
> file1 i am able to extract the start and end timestamp
> file 2 i am able to extract the timestamp
>
> used the following
> my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S %Y'
Thank all now I am able to progress :
file1 i am able to extract the start and end timestamp
file 2 i am able to extract the timestamp
used the following
my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S
%Y'); coming from file1
my $t2 = Time::Piece->strptime('02/23/18 01:
Someone brought to my attention that I had failed to define a
couple of variables in the sample code I posted and they were
quite right. I don't mind sharing my work but the entire
application I wrote to get a brief local weather summary is
242 lines and I was trying to stay close to the topic, he
===> I am using the following regex :
([A-Z][a-z]{2}\s)([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\s[0-9]{4})
> Both are working as expected I would like to know if these are good regex
or it can be better , please suggest .
Concurring with the others, your setting yourself up for trouble with the
RE
I cannot emphasize enough how fragile the perhaps obvious regex based
comparisons of timestamps can be. I second the approach demonstrated by
Илья Рассадин above. There are subtle and difficult to debug problems
buried in timestamps. Not least of which is locale ambiguity,
discontinuities like da
Hi,
> Thank you all for the reply it is working for me .
>
> 1) for 02/23/18 01:10:33 ==> I am using the following regex
> \d\d/\d\d/\d\d\s[012][0-9]:[0-5][0-9]:[0-5][0-9]
> 2) Feb 23 01:10:28 2018
> > I am using the following regex :
> ([A-Z][a-z]{2}\s)([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\
Thank you all for the reply it is working for me .
1) for 02/23/18 01:10:33 ==> I am using the following regex
\d\d/\d\d/\d\d\s[012][0-9]:[0-5][0-9]:[0-5][0-9]
2) Feb 23 01:10:28 2018
> I am using the following regex :
([A-Z][a-z]{2}\s)([0-9]{2}\s[0-2][0-9](:[0-5][0-9]){2}\s[0-9]{4})
> first hurdle is how do I extract this Feb 23 01:10:28 2018 from file1
which regex
Look at perldoc -f stat
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,
$atime,$mtime,$ctime,$blksize,$blocks)
= stat($filename);
Not all fi
Hi All ,
first hurdle is how do I extract this Feb 23 01:10:28 2018 from
file1 which regex can I use ?
convert it into epoch
then
regex for 02/23/18 01:10:33 is required ?
convert into epoch
So if you can suggest the correct regex for both t
use Time::Piece;
my $t1 = Time::Piece->strptime('Feb 23 01:10:28 2018', '%b %d %H:%M:%S %Y');
my $t2 = Time::Piece->strptime('02/23/18 01:10:33', '%m/%d/%y %H:%M:%S');
if ($t1 > $t2) { ... }
On 23/10/2018 09:17, Asad wrote:
Hi All ,
first hurdle is how do I extract this Feb 23 01:10:
/wiki/FAQ
https://metacpan.org/pod/DateTime::Format::Strptime#$strptime-%3Eparse_datetime($string)
The parsing section on https://perlmaven.com/datetime
Duncs
From: Asad [mailto:asad.hasan2...@gmail.com]
Sent: 23 October 2018 07:18
To: Jim Gibson
Cc: beginners@perl.org
Subject: Re: How to compare
Hi All ,
first hurdle is how do I extract this Feb 23 01:10:28 2018 from
file1 which regex can I use ?
convert it into epoch
then
regex for 02/23/18 01:10:33 is required ?
convert into epoch
So if you can suggest the correct regex for both t
Thanks, I will do that. It was for perl .
On Tue, Oct 23, 2018 at 10:42 AM Jim Gibson wrote:
> On Oct 22, 2018, at 9:12 PM, Asad wrote:
> >
> > file1 :
> > Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018
> >
> > Bootstrapping registry and package to current versions...do
On Oct 22, 2018, at 9:12 PM, Asad wrote:
>
> file1 :
> Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018
>
> Bootstrapping registry and package to current versions...done
> statement ERR-2001: table is corrupt check for cause
>
> could not determine the current status.
>
file1 :
Patching tool version 12.1.0.2.0 Production on Fri Feb 23 01:10:28 2018
Bootstrapping registry and package to current versions...done
statement ERR-2001: table is corrupt check for cause
could not determine the current status.
file2 :
LOG file opened at 02/03/18 01:11:05
DUP-05004:
I have a utility I use to wrap logging lines and make them easier to look
at. It has different features than you want but down in the core might be
a few clues of some use.
Without options it generates output like the below:
$ wrap /var/log/mail.log
Aug 23 10:39:52 crf postfix/pickup[12668]:
rea...@newsguy.com (Harry Putnam) writes:
> So trying to simplify things I'm running the script against 3 log
> lines produced by sendmail. The 3 lines below are in a file named
> `mail-loglines'.
Instead of simplifying I made a mess of things... I left this line at
the bottom of the script:
__
jimsgib...@gmail.com (Jim Gibson) writes:
> There is an error in what I posted (sorry). The input is read into
> the $line variable, but your regular expression is implicitly
> testing the default variable $_. The loop should be:
>
>
> while ( my $line = <> ) {
> if ( $line =~ /$rgx/ ) {
>
> On Aug 18, 2017, at 6:05 AM, Harry Putnam wrote:
>
> jimsgib...@gmail.com (Jim Gibson) writes:
>>>
>
> A second attempt trying to use your last example as inspiration
> follows:
>
> ---8< snip -8< snip --
>
> use strict;
> use warnings;
> use Text::Wrap;
>
>
ine
>> 2) When such a line is found, print newline first then
>> 3) wrap any lines longer than specified number of columns.
>>
>>
>> I was not able to divine from `perldoc Text::Wrap' how to really use
>> it to do what I want.
>>
>> my non-w
jimsgib...@gmail.com (Jim Gibson) writes:
>> On Aug 13, 2017, at 6:02 PM, Harry Putnam wrote:
>>
>> My aim:
>>
[...]
>> my @text;
>>
>> while (<>) {
>> if (/$rgx/) {
>> print "\n";
>> print wrap(",", @text);
>> }
>> }
>>
>> It wasn't at all clear from perldoc Text::Wrap how @text is sup
wrap any lines longer than specified number of columns.
>
>
> I was not able to divine from `perldoc Text::Wrap' how to really use
> it to do what I want.
>
> my non-working effort stripped to the bare bones:
>
> use strict;
> use warnings;
> use Text::Wrap;
Text::Wrap' how to really use
it to do what I want.
my non-working effort stripped to the bare bones:
use strict;
use warnings;
use Text::Wrap;
my $rgx = qr/@{[shift]}/;
$Text::Wrap::columns = 68;
my @text;
while (<>) {
if (/$rgx/) {
print "\n";
print wrap(&
Thanks!
I didn't knew that feature.
It's very cool!
Thank you very much.
Best regards,
David Santiago
On Sat, 6 May 2017 23:03:48 +0100
David Precious wrote:
> On Sat, 6 May 2017 23:13:04 +0200
> David Emanuel da Costa Santiago wrote:
> > Is there any regular expression, that can match an
On Sat, 6 May 2017 23:13:04 +0200
David Emanuel da Costa Santiago wrote:
> Is there any regular expression, that can match any consecutive
> character?
You want to use a back-reference - e.g. /(.)\1+/ matches any character
followed by one or more of that same character.
Demo:
[davidp@cloudburst
Hello.
Is there any regular expression, that can match any consecutive
character?
Example:
qwerty -> no match
qwertyq -> no match
qqwerty -> match because of the qq
qwerrrty -> match because of the rrr
and so on...
My obvious attempts that resulted in failure were:
1- /.{2,}/
2- /[qwerty]{2,
Shekar writes:
> Depending upon how vendor implemented SNMP part for their device, other
> than standard OID's such as sysUptime , will have custom MIB files.
> You should try visiting their website for downloading required MIB file for
> your switch.
> Then import them with -m or put it under sn
mailing lists writes:
> are you sure?
>
> # emerge -s expect
>
> [ Results for search key : expect ]
> Searching...
>
> [...]
> * dev-perl/Expect
> Latest version available:
t available as Gentoo package, so I skipped it.
> >
> > SNMP is probably better, so I need to learn about that first and see if
> > I can use it. I guess it's time to learn about SNMP anyway :)
>
> Ok, I got this far:
>
>
> snmpget -v 3 -u lee h3c .1.3.6.1.2.1.1.3.
nd see if
> I can use it. I guess it's time to learn about SNMP anyway :)
Ok, I got this far:
snmpget -v 3 -u lee h3c .1.3.6.1.2.1.1.3.0
DISMAN-EVENT-MIB::sysUpTimeInstance = Timeticks: (1081149678) 125 days,
3:11:36.78
Any idea how to get the temperature reading?
--
To unsubscribe, e
Shekar writes:
> +1 for SNMP, or if Net::SSH::Perl didn't help, can you try expect module?
Thanks! 'Expect' isn't available as Gentoo package, so I skipped it.
SNMP is probably better, so I need to learn about that first and see if
I can use it. I guess it's time to learn about SNMP anyway :
+1 for SNMP, or if Net::SSH::Perl didn't help, can you try expect module?
Cheers,
Shekar
On Wed, Apr 19, 2017 at 1:38 PM, lee wrote:
> Duncan Ferguson writes:
>
> > If the temperature is available on your switch, can you not enable SNMP
> on it and read the specific OID to get the info? Far
Duncan Ferguson writes:
> If the temperature is available on your switch, can you not enable SNMP on it
> and read the specific OID to get the info? Far far easier than trying to
> keep an ssh connection open, I think.
>
> I guess this does depend on the switch type and whether the info is ava
SSC_perl writes:
>> On Apr 18, 2017, at 6:19 PM, lee wrote:
>>
>> The purpose is to get room temperature readings
>
> Hey Lee,
>
> I don’t have a solution for you, but I have an idea that might
> help. Have you tried the Misterhouse mailing list? It’s a Perl
> script that handles sensor
, though.
Duncs
-Original Message-
From: lee [mailto:l...@yagibdah.de]
Sent: 19 April 2017 02:20
To: beginners@perl.org
Subject: how to repeatedly execute a command on a remote machine via a shh
login from within a perl program capturing the output?
Hi,
I'm trying to repeatedly ex
Hm, IIUC can't the remote script sleep-loop and send output
back asynchronously. (More reseach needed on async piece)..
$ssh->system('/path/to/remote_script arg, arg,...');
#!/bin/...
# remote_script
for (...); do get_temp_probe(); . ; sleep 300; done
On Tue, Apr 18, 2017 at 6:19
> On Apr 18, 2017, at 6:19 PM, lee wrote:
>
> The purpose is to get room temperature readings
Hey Lee,
I don’t have a solution for you, but I have an idea that might help.
Have you tried the Misterhouse mailing list? It’s a Perl script that handles
sensors like that so someone there
Hi,
I'm trying to repeatedly execute a command on a remote machine and
to capture the output with a perl program.
I have tried Net::OpenSSH and Net::SSH::Perl. Both log in, execute the
command, capture the output --- and then log out. According to the log
file of the remote machine, Net::OpenS
Thanks for your reply.
First of all, my example was not about performance, but was about an
idea. So you are correct about qw and sort. I'm sorry if someone saw
this example and decide to use it without reading perldoc and
understanding what we do.
We need to reverse sort because when we st
On Wed, 12 Apr 2017 19:34:22 -0400
Uri Guttman wrote:
> it is so odd to be filtering an array by the indexes. i smell an XY
> problem here. i wonder what the real goal is vs how to solve it this
> way.
>
> thanx,
>
> uri
I was thinking that too.
--
Don'
iginal array of data).
it is so odd to be filtering an array by the indexes. i smell an XY
problem here. i wonder what the real goal is vs how to solve it this way.
thanx,
uri
--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h..
On Wed, 12 Apr 2017 18:16:56 -0400
Uri Guttman wrote:
> On 04/12/2017 05:42 PM, Shawn H Corey wrote:
> > On Wed, 12 Apr 2017 16:19:32 -0400
> > Uri Guttman wrote:
> >
> >
> > my @array;
> >
> > for my $index (reverse sort @indices) {
> >> sort defaults to a lexical sort which won't work well on
On 04/12/2017 05:42 PM, Shawn H Corey wrote:
On Wed, 12 Apr 2017 16:19:32 -0400
Uri Guttman wrote:
my @array;
for my $index (reverse sort @indices) {
sort defaults to a lexical sort which won't work well on integers
with more than 2 digits.
and why are you sorting and reversing the indexes?
Quite! Even the slowest may find redemption in clarity :)
my @arr = qw( zero one two three ... );
my @del = qw( 2,4,... );
my( %del, @new );
@del{ @del } = ();
for (0..$#arr) { push @new, $arr[$_] unless exists $del{$_}}
On Wed, Apr 12, 2017 at 2:18 PM, Paul Johnson wrote:
> On Wed, Apr 12, 20
On Wed, 12 Apr 2017 16:19:32 -0400
Uri Guttman wrote:
> On 04/12/2017 04:08 PM, Илья Рассадин wrote:
> > Hi!
> >
> > You can use splice to delete elements from array.
> >
> > To delete multiple elements you need to do splice in a loop
> >
> > my @indices = qw/2 4 5 7/;
>
> why are you using qw w
1 - 100 of 5713 matches
Mail list logo