$ perl -le'sub otherwise { print "foo" } $x="1"; otherwise $x' foo