But what do these statements really do?s/(.)?^O/\1/g; s/(.)?^N/\1/g;
>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
In reply to Re^2: Control characters
by AnomalousMonk
in thread Control characters
by sandy1028
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |