in reply to Mocking files for reading
my $str = ''; open my $fh, '+>', \$str or die $!; print {$fh} "$_\n" for qw( foo bar baz ); seek $fh, 0, SEEK_SET; print <$fh>; [download]