IO::Handle(3p) Perl Programmers Reference Guide IO::Handle(3p)
IO::Handle(3p) Perl Programmers Reference Guide IO::Handle(3p) # IO::Handle(3p) Perl Programmers Reference Guide IO::Handle(3p) NNAAMMEE # IO::Handle - supply object methods for I/O handles SSYYNNOOPPSSIISS # use IO::Handle; $io = IO::Handle->new(); if ($io->fdopen(fileno(STDIN),"r")) { print $io->getline; $io->close; } $io = IO::Handle->new(); if ($io->fdopen(fileno(STDOUT),"w")) { $io->print("Some text\n"); } # setvbuf is not available by default on Perls 5.8.0 and later. use IO::Handle '_IOLBF'; $io->setvbuf($buffer_var, _IOLBF, 1024); undef $io; # automatically closes the file if it's open autoflush STDOUT 1; DDEESSCCRRIIPPTTIIOONN # "IO::Handle" is the base class for all other IO handle classes. ...