sub foo { my $z = 4; return $z; } #### my $x; { my $var = 4; $x = \$var; } # 'var' is now out of scope. print $$x; # but this still prints "4". #### sub new_filehandle { local *FH; return *FH; } $x = new_filehandle(); #### sub new_filehandle { local *FH; *FH; # 'return' is implied } $x = new_filehandle(); #### sub new_filehandle { local *FH; # return of *FH is implied } $x = new_filehandle(); #### $x = do { local *FH; }; # return of *FH is implied