bluprint has asked for the wisdom of the Perl Monks concerning the following question:

How do I read a file one byte, or a specified number of bytes, at a time; rather than just reading to the newline (or whatever $/ is)

Replies are listed 'Best First'.
Re: Read a file
by japhy (Canon) on May 08, 2002 at 20:59 UTC
    You could set $/ to a reference to an integer, and then you'd read that many bytes at a time with the standard <FH> syntax.

    _____________________________________________________
    Jeff[japhy]Pinyan: Perl, regex, and perl hacker, who'd like a job (NYC-area)
    s++=END;++y(;-P)}y js++=;shajsj<++y(p-q)}?print:??;

Re: Read a file
by particle (Vicar) on May 08, 2002 at 22:16 UTC
Re: Read a file
by guha (Priest) on May 08, 2002 at 20:22 UTC
Re: Read a file
by BUU (Prior) on May 08, 2002 at 20:20 UTC