in reply to Reading and Writing Filehandles
Do you want to use a perl variable as if it were a file? Previous versions of perl had IO::Stringy and IO::Scalar for that. Perl 5.8 with PerlIO has it natively. Just use a reference to the scalar in the filename slot of open.
I meditated on this in Open Has a New Trick.my $foo = ''; open FILEHANDLE, '+>', \$foo or die $!; print FILEHANDLE "Contents of File"; seek(FILEHANDLE,0,0); my @contents = <FILEHANDLE>; close FILEHANDLE or die $!; print 'From $foo: ', $foo, $/; print 'From file read: ', @contents, $/;
After Compline,
Zaxo
|
|---|