Bug#837398: add examples

積丹尼 Dan Jacobson jidanni at jidanni.org
Sun Sep 11 10:48:36 UTC 2016


In fact do perhaps add examples to show that i and g each belong in
their proper spot and not any other way:

$ perl -wle 'my $r=qr/w/;  print for "Wow" =~ /$r/ig;'
w
(Could perhaps warn too. But yes not easy at run time.)
$ perl -wle 'my $r=qr/w/i; print for "Wow" =~ /$r/ig;'
W
w
$ perl -wle 'my $r=qr/w/g; print for "Wow" =~ /$r/ig;'
(Gives error message, as expected.)




More information about the Perl-maintainers mailing list