in reply to Re^8: Determining what line a filehandle is on
in thread Determining what line a filehandle is on

Actually this was introduced in 5.6.0, so new really isn't that relative. In 5.005_03 and earlier you have to jump an extra hoop:
my $foo = do {local *FH}; # etc as above
or if you prefer a different look, you can use Symbol and then do it with:
my $foo = gensym(); # And so on
But with 5.6 it autovivifies for you, and that is rather nice.