Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Oh wise ones,
I'm having issues with the following:
$value="12\012"; print $value;
The output is 12 and a line feed (enter). Now when I read the above value in from an xml file,
then my output is: 12\012.
Any idea how I can fix this problem? I need to specify the line feed or other, but they need to be read from an xml file.
Thanks in advance...

Replies are listed 'Best First'.
Re: Problems with interpreting octal values
by ikegami (Patriarch) on Dec 18, 2006 at 16:13 UTC

    In XML, a LF can be encoded as 
.

    If you encode it differently, you'll have to decode it yourself.

Re: Problems with interpreting octal values
by Anonymous Monk on Dec 18, 2006 at 16:43 UTC
    Thanks a lot, works like a charm