in reply to printing to file, which is a variable
my $foo = ''; open FILEHANDLE, '+>', \$foo or die $!; [download]