Michael Chapman wrote:
> What is the coolest way of unescaping strings?
> 
> I.e. I have a string which contains things like
>     \n
>     \t
>     \\
>     \"
>     ""
> 
> etc each of which are two characters which should be converted to a
> single character.
> 
> I have a feeling there must be a one line way of doing this intead of
> the multi line subroutine I have at the moment.

One line, but kind of "evil":

   eval "\"#{s}\""

Evil, because it allows

   s = '#{do_anything(); "I didn't do it."}'