use strict; use warnings; sub _format_caller { my @x=caller($_[0]); print "elements:",scalar(@x),"\n"; print(join(',',@x),"\n"); } sub f { my $level=$_[0]; print "test caller $level\n"; _format_caller($level); } f(1); f(2); #### > Use of uninitialized value in join or string at U:\develsv\ARTS\playground\callertest.pl line 7. Use of uninitialized value in join or string at U:\develsv\ARTS\playground\callertest.pl line 7. Use of uninitialized value in join or string at U:\develsv\ARTS\playground\callertest.pl line 7. test caller 1 elements:10 main,U:\develsv\ARTS\playground\callertest.pl,16,main::f,1,,,,2,UUUUUUUUUUU test caller 2 elements:0