use strict ; use warnings ; my $handle = oldstyle('FHOO') ; print FHOO "Open Worked !\n" ; print FHOO "Yes indeed !\n" ; { no strict 'refs' ; print $handle "Via \$handle, but no strict 'refs'\n" ; } ; my $FH ; { no strict 'refs' ; $FH = \*{$handle} ; } ; print $FH "Now via \$FH, with strict 'refs'\n" ; print $handle "Will throw error under strict 'refs'\n" ; sub oldstyle { my ($indirect_handle) = @_ ; # $indirect_handle contains name of handle to open on { no strict 'refs' ; open $indirect_handle, '>&1' ; } ; return $indirect_handle ; } ;