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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.