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


in reply to Re: Re: in memory files in 5.6.1
in thread in memory files in 5.6.1

Not true, this should work:

use IO::Scalar; my $fh = IO::Scalar->new; print $fh "foo\n"; # Rather than $fh->print ... # or, if you prefer select $fh; print "bar\n";

This works through the magic of a tied file handle. See perltie for details on tying a file handle.