in reply to Re: Rethrowing with die $@ considered harmful (local $_ buggy)
in thread Rethrowing with die $@ considered harmful
In my own code i always local'ize $_ using for, as recommended in Camel III:
s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
Solution 2
It's IMO even more readable than the local $_ variant, and passes all your tests.sub dequote { my $string = @_ ? $_[0] : $_; for ($string) { s/^"//; s/"$//; s/\\(.)/$1/g; return $_; } }
s;;Just-me-not-h-Ni-m-P-Ni-lm-I-ar-O-Ni;;tr?IerONim-?HAcker ?d;print
In Section
Meditations