in reply to Length-limiting handle
How about setting local $/ to a reference to integer before the call, and then read one scalar from the handle?
{ local $/ = \get_next_length(); $foo = <FH>; }
Are you decoding RIFF files, by chance? You may want to think about unpack's 'C4 V/A*' format ( I think that's correct for RIFF)
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Length-limiting handle
by John M. Dlugosz (Monsignor) on Feb 20, 2003 at 05:30 UTC |