Chris,

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 systems, the length was 304.
(No idea!) But I had to assign 2 to the $newline variable when on Windows
for the seek to work -- seeking the record with an offset from the beginning
of the file.

I still haven't figured that one out. My record is 303 and length of record
returns 304. Why... I just don't know.

David

$cst_template =
"A9A15A15A1A30A30A30A30A9A2A13A40A13A5A2A16A2A2A1A1A10A10A10A7";
$cst_rec_len = 303;                       # sum all customer fields
$newline = 2;                             # changes based on OS
$cst_offset = $cst_rec_len + $newline;


From: chris brown [mailto:[EMAIL PROTECTED]]

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

Reply via email to