Re: CR LF with UNIX and Windows (DOSish?)

2001-05-26 Thread David Monarres
Have you tried setting the $/ (input record seperator) and $\ (output seporator) variable for all of your scripts to the same thing accross platforms. I don't know if the perl script also creats the data but if it does you can use the \oXXX control code to set this accross platforms. David

Re: CR LF with UNIX and Windows (DOSish?)

2001-05-26 Thread Hendrik Van Belleghem
AFAIK Perl will change \n to \n\r if used on Windows... Dynamically changing $/ and $\ isnt recommended, unless you know what you're doing... in which case you should be localizing em. Have you tried setting the $/ (input record seperator) and $\ (output seporator) variable for all of your

Re: CR LF with UNIX and Windows (DOSish?)

2001-05-15 Thread Paul
--- chris brown [EMAIL PROTECTED] wrote: --- David Falck [EMAIL PROTECTED] wrote: --snip-- I am pretty new at Perl so don't know the syntax to do this, but could you sidestep the issue and count the number of bytes in \n, then subtract as appropriate? \n is just one byte, but you might

CR LF with UNIX and Windows (DOSish?)

2001-05-14 Thread chris brown
--- David Falck [EMAIL PROTECTED] wrote: --snip-- I am pretty new at Perl so don't know the syntax to do this, but could you sidestep the issue and count the number of bytes in \n, then subtract as appropriate? Chris __ Do You Yahoo!? Yahoo!

RE: CR LF with UNIX and Windows (DOSish?)

2001-05-14 Thread King, Jason
David Falck writes .. I tested something similar to your suggestion. I created the customer record on my laptop's Windows98 OS, and also on my web site's UNIX OS. Then I read one record and without chomp-ing (removing the input record separator), got the length for the record. On both operating

Re: CR LF with UNIX and Windows (DOSish?)

2001-05-13 Thread Mike Lacey
Subject: CR LF with UNIX and Windows (DOSish?) Is there a programmatic way to tell if I'm on Windows or UNIX? I know that $^0 returns the name of the operating system, but can I count on matching /MS/i or /Win/i to determine if it's Windows? If Windows, I'll assign 2 to $newline below, else I'll

Re: CR LF with UNIX and Windows (DOSish?)

2001-05-13 Thread Mike Lacey
AM Subject: RE: CR LF with UNIX and Windows (DOSish?) Mike, Thanks for your response. Yes, Perl knows which system it's on, and because of this I have no problem when writing the record. But because I'm doing a seek when reading the record I have to account for every byte in my algorithm

RE: CR LF with UNIX and Windows (DOSish?)

2001-05-13 Thread King, Jason
David Falck writes .. Is there a programmatic way to tell if I'm on Windows or UNIX? I know that $^0 returns the name of the operating system, but can I count on matching /MS/i or /Win/i to determine if it's Windows? If Windows, I'll assign 2 to $newline below, else I'll assign 1. it