First point why on earth pass \@CBRF3 and $#CBRF3 to the function why not just get the index of the las element of @CBRF3 in the function. That data seems totally redundent.
Anyway to answer your question the answer is NO as the names of the passed arrays are not remembered by Perl (as shown). You can however get details on the caller, or call stack.
use Carp; print "Test\n"; func1( @args ); sub func1 { &func2 } sub func2 { confess "This is who to blame for sending no args\n" unless @_; } __DATA__ This is who to blame for sending no args main::func2 called at script line 7 main::func1() called at script line 5
I expect knowing where the call(s) came from will be much more useful for debugging than knowing the array names. You can generate this info youself using caller. If you really need them names you will have to pass something like an array of array refs:
func( [ 'ary1' => \@ary1 ], [ 'ary2' => \@ary2 ] ); sub func { print "Name $_->[0], Array Ref $_->[1]\n" for @_; }
I suspect you will find the call stack more help.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
In reply to Re: printing references
by tachyon
in thread printing references
by mhearse
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |