$ perl -le ' > $text = q{this text}; > print map { s{this}{that}; $_ } $text;' that text $