perl -e 'use File::Temp; $fh = File::Temp->new(); $fh->unlink_on_destroy(0); bo($fh); sub bo { my $f= shift; print $f "test"; }'