$ perl -wle " { local *foo = sub { warn 6}; foo; } foo; " Unquoted string "foo" may clash with future reserved word at -e line 1. Unquoted string "foo" may clash with future reserved word at -e line 1. Useless use of a constant ("foo") in void context at -e line 1. Useless use of a constant ("foo") in void context at -e line 1. $ perl -wle " { local *foo = sub { warn 6}; foo(); } foo(); " 6 at -e line 1. Undefined subroutine &main::foo called at -e line 1.