FileHandle(3p) Perl Programmers Reference Guide FileHandle(3p)
FileHandle(3p) Perl Programmers Reference Guide FileHandle(3p) # FileHandle(3p) Perl Programmers Reference Guide FileHandle(3p) NNAAMMEE # FileHandle - supply object methods for filehandles SSYYNNOOPPSSIISS # use FileHandle; $fh = FileHandle->new; if ($fh->open("< file")) { print <$fh>; $fh->close; } $fh = FileHandle->new("> FOO"); if (defined $fh) { print $fh "bar\n"; $fh->close; } $fh = FileHandle->new("file", "r"); if (defined $fh) { print <$fh>; undef $fh; # automatically closes the file } $fh = FileHandle->new("file", O_WRONLY|O_APPEND); if (defined $fh) { print $fh "corge\n"; undef $fh; # automatically closes the file } $pos = $fh->getpos; $fh->setpos($pos); $fh->setvbuf($buffer_var, _IOLBF, 1024); ($readfh, $writefh) = FileHandle::pipe; autoflush STDOUT 1; DDEESSCCRRIIPPTTIIOONN # NOTE: This class is now a front-end to the IO::* classes. ...