in reply to caller() mystery
use strict; use warnings; sub _format_caller { my @x=caller($_[0]); print(join(',',@x[0..2]),"\n"); } sub f { my $level=$_[0]; print "test caller $level\n"; _format_caller($level); print("\n"); } f($_) for 0..2;
test caller 0 main,713838.pl,12 test caller 1 main,713838.pl,16 test caller 2 Use of uninitialized value in join or string at 713838.pl line 6. Use of uninitialized value in join or string at 713838.pl line 6. Use of uninitialized value in join or string at 713838.pl line 6. ,,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: caller() mystery
by rovf (Priest) on Sep 26, 2008 at 10:11 UTC | |
by ikegami (Patriarch) on Sep 26, 2008 at 10:23 UTC | |
by rovf (Priest) on Sep 26, 2008 at 10:41 UTC | |
by JavaFan (Canon) on Sep 26, 2008 at 10:55 UTC |