$ perl -e'$x="1"; $x->otherwise' Can't call method "otherwise" without a package or object reference at -e line 1. #### $ perl -e'$x="1"; otherwise $x' Can't call method "otherwise" without a package or object reference at -e line 1. #### $ perl -le'sub otherwise { print "foo" } $x="1"; otherwise $x' foo