in reply to Re^3: how to find particular string and store in to variable
in thread how to find particular string and store in to variable
Interestingly, what is captured to $var in a statement like
my ($var) = $s =~ m{ (\d+) \z }xms;
is not the same as what is captured to $1:
Isn't that just because the RE didn't match the first time through the loop, so $1 still held 'zot' ?
If your RE did match the first time through, $1 would have been reset and would therefore match $var ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: how to find particular string and store in to variable
by AnomalousMonk (Archbishop) on Jun 25, 2015 at 14:39 UTC | |
by 1nickt (Canon) on Jun 25, 2015 at 16:08 UTC |