In unix <lf> is 10 decimal or \012 - octal.
<cr> is 13 decimal or \015 - octal.

Try this: perl -e 'print "<lf> - ", ord("\n"), "<cr> - ", ord("\r")'

To put <cr><lf> on UNIX you should add "\r\n" at the end of your print
statement.

Stefan Dragnev

On Mon, 5 Feb 2001, Frank Speiser wrote:

> Hello Everyone,
>
> I have a quick question and I haven't been able to find the answer in
> any of my many books on Perl. Someone in here might know off the top of
> their head:
>
> In Perl, this is 5.x running on a Unix environment, what does the
> newline (\n) mean literally. Is it the Unix standard <lf> or is it
> <cr><lf>?
>
> I am trying to put together a file with the record separator as
> <cr><lf>. Will \n do it, and if not where can I get the ascii
> equivalents to those characters?
>
> Like Bartles and James, thanks for your support.
>
> -Frank
>

Reply via email to