in reply to Equivalent code for input line operator on a scalar?
In perl 5.8 you can open a scalar as if it were a file, by giving a reference to the scalar in the filename slot,
In earlier perl IO::Stringy or IO::Scalar are needed, but their treatment of $/ leaves something to be desired.open my $fh, '<', \$output or die $!; while (<$fh>) { #... } close $fh or die $!;
After Compline,
Zaxo
|
|---|