[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] MacPerl cgi-script question




In Regards to your letter <v01540b00ad6af6f4ad66@[129.240.68.115]>:
> I just ran this though
> printf "%x %x %x %x",ord "\n" ,ord "\l",ord "\r", ord "\f";
> 
> and got this result:
> d 0 a c
> 
> :-(
> 
> Your best authority in these matters is always perl itself. Of course you
> need the manpage for printf to get the formatting codes. %x is hex, %d is
> decimal.

And the Macintosh documentation. Line termination on the Mac
is 0x0D, and when I run a Perl script with lots of "\n"'s in
it, I want the output to be "correct", meaning 0x0D.

Those porting scripts betweem platforms should always define
line termination in a variable and use substitution.

You might make an argument that the meaning of "\n" could be
configurable, but I suspect that would be difficult in the code.


tim.

time@ice.com  (UUCP: heifetz!tbomb!time)

USENET - a slow moving self parody... ph