Not the same, with or without /g makes a big difference in this case.
use warnings; use strict; my $str1 = "112345"; $str1 =~ s/1//g; print $str1, "\n"; my $str2 = "112345"; $str2 =~ s/1//; print $str2, "\n";
In reply to Re^4: Check if a word is included in another
by PeterPeiGuo
in thread Check if a word is included in another
by b4swine
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |