[Chicago-talk] Finding out where a sub is called from

Richard Reina richard at rushlogistics.com
Mon Feb 16 05:49:54 PST 2009

Is there a type of variable that can tell me where a subroutine was called from?

For example if I do:

#!/usr/bin/perl -w
# caller.pl
require "./script.pl";
my $result = do_it();

#!/usr/bin/perl -w
# script.pl

sub do_it {

# who called for me?


More information about the Chicago-talk mailing list