in reply to Re: Rethrowing with die $@ considered harmful (local $_ buggy)
in thread Rethrowing with die $@ considered harmful
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 $_; } }
|
---|