You used the syntax of a method call, but the slot filled by the object reference or package name contains an expression that returns a defined value that is neither an object reference nor a package name. Something like this will reproduce the error: $BADREF = 42; process $BADREF 1,2,3; $BADREF->process(1,2,3); #### $ perl -e 'package Foo::Bar; sub Foo {1}; sub Foo::Bar {1}; package main; Foo::Bar->Foo' Can't call method "Foo" without a package or object reference at -e line 1. #### 'Foo::Bar'->Foo