![]() |
|
"be consistent" | |
PerlMonks |
Re^3: Test if a string is a sub nameby choroba (Cardinal) |
on Oct 06, 2022 at 15:22 UTC ( #11147274=note: print w/replies, xml ) | Need Help?? |
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. 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.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|