Hi Mikrom,
I have solved this issue. I think my original question was not clear.
I want to read the line one\ntwo from a file and I wanted the \n to be interpolated.
I have written a stream line editor like sed and receive commands from a file. These lines are commands for regular expressions...
Hi, thanks for the reply.
I tried this code and on my computer it still prints
one\n\two\three
as a single line with no interpolation.
I'm not sure why??.
Hi
I have the following code:
open FH, "<", "file.txt";
my $line = <FH>;
print "line = " . $line . "\n";
file.txt contains one line:
one\ntwo
The string $line is printed literally. What do I have to do
to get it to print
one
two
?
I have tried opening the file with :raw :crlf :any but nothing...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.