>perl -wMstrict -le "for my $str (@ARGV) { printf q{%s -> }, $str; $str =~ s/(.)?^O/\1/g; $str =~ s/(.)?^N/\1/g; print $str; } " OhNoOhNo NotOnNotOn \1 better written as $1 at -e line 1. \1 better written as $1 at -e line 1. Use of uninitialized value $1 in substitution iterator at -e line 1. OhNoOhNo -> hNoOhNo Use of uninitialized value $1 in substitution iterator at -e line 1. NotOnNotOn -> otOnNotOn