rongoral has asked for the wisdom of the Perl Monks concerning the following question:
First -
Second -my ($package, $filename, $line) = caller; print qq[Problem in $filename at line $line\n];
Third -my @caller = caller(0); print qq[Problem in $caller[1] at line $caller[2]\n];
My main question revolves around what the parentheses do around caller: (caller(0))[1].my $filename = (caller(0))[1]; my $line = (caller(1))[2]; print qq[Problem in $filename at line $line\n];
Thanks for the help.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What makes (caller(0))[1] do what it does?
by FunkyMonk (Bishop) on Aug 28, 2007 at 15:52 UTC | |
by rongoral (Beadle) on Aug 28, 2007 at 15:58 UTC |