in reply to Reading fixed length records

What am I doing wrong?

using <> instead of read.

(Golf score: 24)

Replies are listed 'Best First'.
Re: Re: Reading fixed length records
by davorg (Chancellor) on May 25, 2001 at 17:28 UTC

    Whilst I'd probably use read in this case, there's no reason why to can't use <>. Setting $/ to a reference to a number will set the number of bytes returned each time.

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me