sub umm() { print "---\n"} sub _caller(){(caller(1))[3]=~/^(?:main::)?(.*)$/} sub for_blah { my $foo for 1; printf "%-15s %d\n",_caller,$foo++; } sub not_for_blah { my $foo for (); printf "%-15s %d\n",_caller,$foo++; } sub if_blah { my $foo if 1; printf "%-15s %d\n",_caller,$foo++; } sub not_if_blah { my $foo if 0; printf "%-15s %d\n",_caller,$foo++; } for_blah(),for_blah(),for_blah(),umm, not_for_blah(),not_for_blah(),not_for_blah(),umm, if_blah(),if_blah(),if_blah(),umm, not_if_blah(),not_if_blah(),not_if_blah(),umm; __END__