in reply to Sticking IO::Handle on top of a scalar.
For more info see. open and IO::Scalar.my $str = ''; open my $fh, '>', \$str; print {$fh} 'this will end up in $str'; print "\$str contains: $str\n"; __output__ $str contains: this will end up in $str
_________
broquaint
update: reworded first sentence to make sense
|
|---|