$_="FourThreeTwoOne, Three, Four, One, Two"; $1="Three"; $second="&&&&"; s/$2/$second/g; print; #### $1="Three"; #### s/$2/$second/g; #### { local $_="FourThreeTwoOne, Three, Four, One, Two"; # ... } #### use strict; use warnings; #### my $second="&&&&";
## $1="Three"; ##
## s/$2/$second/g; ##
## { local $_="FourThreeTwoOne, Three, Four, One, Two"; # ... } ##
## use strict; use warnings; ##
## my $second="&&&&";