Perl ENV variable contains newline and tab
Posted
by Michael
on Stack Overflow
See other posts from Stack Overflow
or by Michael
Published on 2010-05-14T15:36:32Z
Indexed on
2010/05/14
19:54 UTC
Read the original article
Hit count: 180
perl
|environment-variables
Say I have an environment variable myvar
myvar=\tapple\n
when the following command will print out this variable
perl -e 'print "$ENV{myvar}"'
I will literally have \tapple\n
, however, I want those control chars to be evaluated and not escaped. How would I achieve it?
In the real world $ENV residing in substitution, but I hope the answer will cover that.
© Stack Overflow or respective owner