Nope but you can still get that info.
#!/usr/bin/perl print "Hello\n"; &ThisSub; exit(0); sub ThisSub { my $sub = (caller(0))[3]; $sub =~ s/.*:://; # remove the package name, comment out of you wan +t it too print "I am now in sub $sub\n"; return 1; # or simply 1; }
In reply to Re: Special variable to return current sub name?
by Mr. Muskrat
in thread Special variable to return current sub name?
by spudnic
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |