http://www.perlmonks.org?node_id=694106


in reply to Re^2: Chapter 8 of intermediate perl
in thread Chapter 8 of intermediate perl

Handles created by open are also IO::Handle objects. All IO handles are, actually. You just need to load IO::Handle (use IO::Handle;) to use the methods.

use IO::Handle; open(my $fh, '>', $fn) or die; print $fh 'foo!'; $fh->flush(); # From IO::Handle