Here's my code:
#!C:/Perl/bin/perl # # dbug.pl # @currTime = localtime(time); dBug_showArray(@currTime); exit; sub dBug_showArray { print "\n\n\Value of array '" . WHATISTHISVARIABLE . "' is:\n"; my (@lclarray) = @_; my $counter = 0; foreach (@lclarray) { print $counter . " = '" . $_ . "'\n"; $counter += 1; } print "\nPress [Enter] to continue "; my $dummy_var = <STDIN>; print "\n"; return; }
I'm looking for it to produce the output:
Value of array '@currtime' is: 0 = '33' 1 = '29' 2 = '8' 3 = '28' 4 = '10' 5 = '101' 6 = '3' 7 = '331' 8 = '0'
(So in case it's not clear, I'm looking for what goes in place of WHATISTHISVARIABLE). Thanks in advance for any and all help!

In reply to Can I get the name of a variable passed to a subroutine? by FelixDaCat

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.