in reply to Re^2: Test if a string is a sub name
in thread Test if a string is a sub name
It seems the documentation uses the term "subroutine name" in quite a confusing way. Check the examples:
Use of a subroutine call, rather than a subroutine name, as an argument to exists is an error.exists ⊂ # OK exists &sub(); # Error
So, in this context, "subroutine name" includes the ampersand.
Considering strict, note the exceptions to strict 'refs':
We are not calling the subroutine, we're just checking it exists/is defined.$bar = \&{'foo'}; &$bar;
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom