use Tie::Handle; use Symbol "geniosym"; my $fh = geniosym; tie *$fh, "Tie::StdHandle" or die; print tied(*$fh);