$ perl -we'sub foo; my $obj = bless {}, "main"; $obj->foo()' Undefined subroutine &main::foo called at -e line 1.