print "REPLACE <$pattern> with <$replacement>\n"; while () { # print "<$_>\n"; S/$pattern/$replacement/g; print "AFTER <$_>\n"; print OUT $_; } # end while