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