perl -le 'use strict; my $str1 = "test"; ( my $str2 = $str1 ) =~ s/t/m/g; print $str2'