Re: Pattern match operator

2013-05-04 Thread Jim Gibson
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 $_

Re: Pattern match operator

2013-05-04 Thread Florian Huber
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

Re: Pattern match operator

2013-05-04 Thread Rob Dixon
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

Pattern match operator

2013-05-04 Thread Florian Huber
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.