Jaap has asked for the wisdom of the Perl Monks concerning the following question:
prints just one 0. When i remove the s operator, it returns three 0's as expected.my $testVar = <<EOF; fasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf asdfasdfasdf sdfasdfasdf EOF while ($testVar =~ m/(.*?)\n\n/sg) { print 0; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: strange behaviour of /regexp/sg
by hv (Prior) on Mar 21, 2003 at 17:25 UTC | |
by Jaap (Curate) on Mar 21, 2003 at 18:41 UTC | |
|
Re: strange behaviour of /regexp/sg
by dga (Hermit) on Mar 21, 2003 at 16:44 UTC | |
|
Re: strange behaviour of /regexp/sg
by diotalevi (Canon) on Mar 21, 2003 at 16:44 UTC | |
by Jaap (Curate) on Mar 21, 2003 at 16:46 UTC | |
|
Re: strange behaviour of /regexp/sg
by Jaap (Curate) on Mar 21, 2003 at 16:37 UTC | |
|
Re: strange behaviour of /regexp/sg
by Jaap (Curate) on Mar 21, 2003 at 17:13 UTC |