$\="\n"; sub show { print join "\t",(caller(0))[0..3]; }; show(); *func = \&show; func(); #### /usr/bin/perl -w /tmp/tst.pl main /tmp/tst.pl 6 main::show main /tmp/tst.pl 10 main::show