I think you've missed something.
Perl defines the following zero-width assertions:In other words, if the regex starts with \G the match has to start at pos or the regex doesn't match.
\G - Match only at pos() (e.g. at the end-of-match position of prior m//g)
Perl Idioms Explained - @ary = $str =~ m/(stuff)/g by tachyon should help with regexes in list context.
Hope this helps.
antirice
The first rule of Perl club is - use Perl
The ith rule of Perl club is - follow rule i - 1 for i > 1
In reply to Re: m//g behaves strange...
by antirice
in thread m//g behaves strange...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |