my $ref = \&foo::bar::func; my $str = some_magic($ref); # got "foo::bar::func"