use 5.010; # just for "say" use B; ($f,$g)=(333,"xyz"); say ref B::svref_2object(\$f); say ref B::svref_2object(\$g);