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; }
In reply to strange behaviour of /regexp/sg by Jaap
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |