Yes, except for a precedence problem:
Without some sort of scoping disambiguation, the s/g/G/ binds to 3 inc:\@Work\Perl\monks>perl -wMstrict -le "my $x = 'abcdefghi'; substr($x, 5, 3) =~ s/g/G/; print $x; " abcdefGhi
Give a man a fish: <%-{-{-{-<
In reply to Re^6: regex syntax and idomatic Perl
by AnomalousMonk
in thread regex syntax and idomatic Perl
by cbeckley
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |