rr, e.g.:
> $ test_net_ping.pl
> A::mytest died, saying can't ping www.google.com at /usr/local/bin/
> test_net_ping.pl line 14.
>
> Just to note, as a package test, normally, your package A and B would be
> separate scripts (say Apingtest.pm and Bpingtest.pm, in the @INC path)
}
>
>
>
> https://perldoc.perl.org/functions/die.html
> https://perldoc.perl.org/functions/warn.html
> https://perldoc.perl.org/perlvar.html#Error-Variables
>
> On Thu, 31 Oct 2019 at 09:42, Maggie Q Roth wrote:
>
>> Hello
>>
>> Sorry I am new to per
Hello
Sorry I am new to perl, I was reading the charter about package.
I tried to write the code below:
use strict;
use Net::Ping;
package A;
sub mytest {
my $host = shift;
my $p = Net::Ping->new();
unless ($p->ping($host)) {
$p->close();
die "can't ping $host";
}
}
what's V.*?
Maggie
On Fri, Oct 25, 2019 at 6:28 PM Илья Рассадин wrote:
> For example, this regex
>
> /(?[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3})\s+(?\/.*)/
>
> On 25.10.2019 13:23, Maggie Q Roth wrote:
> > Hello
> >
> > There are two primary types
Hello
There are two primary types of lines in the log:
60.191.38.xx/
42.120.161.xx /archives/1005
I know how to write regex to match each line, but don't get the good result
with one regex to match both lines.
Can you help?
Thanks,
Maggie
2010/8/22 Uri Guttman :
>>>>>> "AQ" == Albert Q writes:
>
> AQ> 2010/8/22 Uri Guttman
> >>
> >> >>>>> "AQ" == Albert Q writes:
> >>
> >> a quick comment. pack is most likely not a beg
2010/8/22 Dr.Ruud :
> On 2010-08-22 13:16, Albert Q wrote:
>
>> pack '(H*)*', @values will get the correct result.
>
> Now go and read perlpacktut a few times.
This problem is documented in perlpacktut clearly. Thank you.
> --
> Ruud
>
> --
>
2010/8/22 Uri Guttman
>
> >>>>> "AQ" == Albert Q writes:
>
> a quick comment. pack is most likely not a beginner issue. i am sure you
> will get help here but think about better forums for asking about
> pack. there are plenty. pack is powerful and some
Hi
I have a text file containing hex strings such as: 12 34 56 78 90 ab cd ef
now I want to change these hex strings to sequence of bytes with the
relative value of 0x12 0x34 0x56
bellow are my codes
use strict;
use warnings;
sub proc_file
{
my ($in, $out) = @_;
open my $fin, '<', $
2009/12/20 Dr.Ruud >
> sftriman wrote:
>
>> I use this series of regexp all over the place to clean up lines of
>> text:
>>
>> $x=~s/^\s+//g;
>> $x=~s/\s+$//g;
>> $x=~s/\s+/ /g;
>>
>> in that order, and note the final one replace \s+ with a single space.
>>
>
> The g-modifier on the first 2 is bog
Greetings.
Is there such a thing as mutlidimensional associative array ?
The reason I ask this is that I intent copy the contents of a time stamped file into
one big file which will be used to update fields of a database. I intend using the
filename ( remember it is time stamped) and use it as
Thank you Tanton, Felix;
- Original Message -
From: "Felix Geerinckx" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, August 26, 2002 5:32 PM
Subject: Re: Read file from second line
> on Mon, 26 Aug 2002 15:15:06 GMT, [EMAIL PROTECTED] (Q) wrote:
&g
Apologies for such a 'lame' question but i read the FAQ on
http://theoryx5.uwinnipeg.ca/CPAN/perl/pod/perlfaq5-full.html
How do i read on from the second line of a text file?
thanks in advance
ICQ : 165709889
13 matches
Mail list logo