use Carp; # time passes # Takes a name to open, returns an open filehandle sub my_open { my $file = shift; # Put the declaration in the open to confuse people? :-) my $fh = do {local *FH}; open($fh, $file) or confess("Cannot open '$file': $!"); return $fh; } #### my $handle = my_open("whatever"); #### print $self->{handle} @stuff; #### print { $self->{handle} } @stuff;