Next Tricks of the Wizards 26

Passing Filehandles

        open FH, ...;
        $data = read_block(FH);
        package My::IO;
        sub read_block {
          my $fh = shift;
          my $buf;
          read $fh, $buf, $BLOCKSIZE;
          $buf;
        }


Next Copyright © 2003 M. J. Dominus