while () { s/^FOO/BAR/; print "$_"; } #### while (s/^FOO/BAR/g) { 1 ; # no op }