ed.
>> And you have made things worse by writing
>>
>> $+{'GFP'} =~ scalar m/(?AVG\s\d)/;
>>
>> which is equivalent to
>>
>> $+{'GFP'} =~ ($_ =~ /(?AVG\s\d)/);
>>
>> so it applies the pattern to the $_
ng element of %+ to undef. However $+{AVG} is now
set, as you did have a capture with that name.
That explains a lot, thank you.
The pattern match
$+{'GFP'} =~ m/(?AVG\s\d);
is in void context (i.e. the result is being discarded. That is mostly
equivalent to scalar context as far
On 04/05/2013 14:26, Florian Huber wrote:
I'm parsing a logfile and don't quite understand the behaviour of m//.
From a previous regex match I have already captured $+{'GFP'}:
use strict;
use warnings;
(...)
$text =~ m/ (?FILTERS .*? WRT)/x;# I simply have my whole
logfile in $text - I
Hi all,
I'm parsing a logfile and don't quite understand the behaviour of m//.
From a previous regex match I have already captured $+{'GFP'}:
use strict;
use warnings;
(...)
$text =~ m/ (?FILTERS .*? WRT)/x;# I simply have my whole
logfile in $text - I know there are better solutions.