$ perl -wE '$x = "txt"; sub ref {return $x . "r";}; say &ref($x);' txtr $ perl -wE '$x = "txt"; sub ref {return $x . "r";}; say ref($x);' Ambiguous call resolved as CORE::ref(), qualify as such or use & at -e line 1. $