in reply to /g matches not really global in scalar context!
jonixuse warnings; use strict; my $x = "aiutino aiutino argh! aiutino"; warn "Argh, one time" for $x =~ / \b aiutino \b /ix; warn "Argh, three times" for $x =~ / \b aiutino \b /gix;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: /g matches not really global in scalar context!
by Aristotle (Chancellor) on Nov 14, 2005 at 14:04 UTC | |
by jonix (Friar) on Nov 14, 2005 at 14:37 UTC | |
|
Re^2: /g matches not really global in scalar context!
by blazar (Canon) on Nov 14, 2005 at 14:31 UTC | |
by Aristotle (Chancellor) on Nov 14, 2005 at 22:17 UTC |