my $n = '[0-9]{1,3}';
if ( =~ ( m[ (?:$n\.){3} $n \s+ \S+ ]x )
{
# match
}
On Fri, Oct 25, 2019 at 3:37 AM Maggie Q Roth wrote:
> 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,
Hm, that's a misbegotten quantifier.
>From 5.26.0 perlreref:
There is no quantifier "{,n}". That's interpreted as a literal string.
On Thu, Nov 23, 2017 at 3:04 AM, Mike Flannigan wrote:
>
> I recently installed the latest version of
> Strawberry Perl. My scripts were developed
> in ActiveSta
It's about what unary ! (bang operator) does to the operand
Here's the dissonance:
perl -E '$x=0; say "x=$x"; $x = !!$x; say "x=$x"'
x=0
x=
It behaves as you expect until you "bang" it twice.
I found a good explanation in the Camel:
"Unary ! performs logical negation, that is "not". The value
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
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
imestamp");
On Sun, Mar 26, 2017 at 3:04 PM, X Dungeness wrote:
> Shawn may have a different take but I think the "local" is
> misplaced and goes out of scope when the call's made.
>
> Here's a potential workaround:
>
> out of scope
>
> On Sun,
Shawn may have a different take but I think the "local" is
misplaced and goes out of scope when the call's made.
Here's a potential workaround:
out of scope
On Sun, Mar 26, 2017 at 2:02 PM, SSC_perl wrote:
>> On Mar 26, 2017, at 1:15 PM, Shawn H Corey wrote:
>>
>> it would mean replacing the s
Certainly an inefficient, unwieldy solution if you're dealing
with huge logfiles. May be problematic on non-Unix too
but you could post-process the logfile in an END {} block
eg, get rid of hr:min:ss part of timestamp for example:
END {
$^I = '';
@ARGV = qw( /path/to/error.log);
whi
Take a look a WWW::Mechanize. The older web suite LWP is an
alternative and that may be enough if you only need a specific
item. LWP::Simple is a possibility to see if you can mine the info
from the page. If there's more complexity, then LWP::UserAgent
is a starting point.
A couple of books too:
On Wed, Mar 1, 2017 at 2:52 AM, Chas. Owens wrote:
> Sadly, Perl will only capture the last match of capture with a qualifier, so
> that just won't work. The split function really is the simplest and most
> elegant solution for this sort of problem (you have a string with a
> delimiter and you wa
On Sat, Nov 5, 2016 at 10:55 AM, Jovan Trujillo
wrote:
> Hi Aaron,
>In perlre I read that \w
> "
>
> \w[3] Match a "word" character (alphanumeric plus "_", plus
> other connector punctuation chars plus
> Unicode
>
On Tue, Oct 4, 2016 at 2:07 PM, X Dungeness wrote:
> Here's a possibly relevant note in the docs for both "alarm" and
> "sleep":
>
> It is usually a mistake to intermix "alarm" and "sleep" calls,
> because "sleep" may
Here's a possibly relevant note in the docs for both "alarm" and
"sleep":
It is usually a mistake to intermix "alarm" and "sleep" calls,
because "sleep" may be internally implemented on your system
with "alarm".
On Tue, Oct 4, 2016 at 1:34 PM, Chas. Owens wrote:
> The first alarm
2016 at 1:06 PM, Uri Guttman wrote:
> On 09/06/2016 03:59 PM, X Dungeness wrote:
>>
>> $str = "ab\rcd\nef\ngh\fij";
>>
>> $str =~ s{ ([^[:print:]]) }{ sprintf( "(%#2X)", ord $1) }gex;
>>
>> > ab(0XD)cd(0XA)ef(0XA)gh(0XC)ij
>&
$str = "ab\rcd\nef\ngh\fij";
$str =~ s{ ([^[:print:]]) }{ sprintf( "(%#2X)", ord $1) }gex;
> ab(0XD)cd(0XA)ef(0XA)gh(0XC)ij
On Tue, Sep 6, 2016 at 9:11 AM, Matt wrote:
> I am receiving log entries as a string and then writing them to a file
> with the date tacked on beginning. Probl
15 matches
Mail list logo