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
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
--- 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
--- 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!
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
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
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
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