Next The Perl Hardware Store DC.pm Version 49

Globjects

        package IO::Remembers;  
        sub new {
          my ($pack, $filename) = @_;
          my $fh = \do { local *FH };     # Incantation
          open $fh, $filename or return; 
          bless $fh => $pack;
        }
     my $fh = IO::Remembers->new('inputfile');
     my $line = <$fh>;
     read $fh, $bytes, 1024;
     print $fh "Actually this filehandle is open for reading only...\n";
     close $fh;


Next Copyright © 2003 M. J. Dominus