in reply to Perl formats without file handles
With recent perls you can open a filehandle to a scalar:
my $out = ''; + open OUTH, '>', \$out; + my $var = 'world'; format OUTH = Hello @>>>>>>>>>>>>>>> $var . write OUTH; + print $out; [download]