my $string = 'This is\na special\tstring'; my %replace = map { $_ => eval "\\$_" } (qw( n r t )); $string =~ s/\\(.)/exists $replace{$1} ? $replace{$1} : $1/ge; print $string;
In reply to Re: Interpretting character combinations as special characters.
by Corion
in thread Interpretting character combinations as special characters.
by music_man1352000
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |