Next | Tricks of the Wizards | 26 |
This method for filehandles causes some problems
open FH, ...; $data = read_block(FH);
package My::IO;
sub read_block { my $fh = shift; my $buf; read $fh, $buf, $BLOCKSIZE; $buf; }
Here the read function is given the string FH
But FH means My::IO::FH, not main::FH
Function doesn't work
Next | Copyright © 2003 M. J. Dominus |