FelixDaCat has asked for the wisdom of the Perl Monks concerning the following question:
I'm looking for it to produce the output:#!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; }
(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!Value of array '@currtime' is: 0 = '33' 1 = '29' 2 = '8' 3 = '28' 4 = '10' 5 = '101' 6 = '3' 7 = '331' 8 = '0'
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can I get the name of a variable passed to a subroutine?
by IlyaM (Parson) on Nov 28, 2001 at 22:10 UTC | |
by IlyaM (Parson) on Nov 29, 2001 at 04:34 UTC | |
|
Re: Can I get the name of a variable passed to a subroutine?
by stefan k (Curate) on Nov 29, 2001 at 17:23 UTC | |
by IlyaM (Parson) on Nov 30, 2001 at 23:18 UTC | |
|
Re: Can I get the name of a variable passed to a subroutine?
by Biker (Priest) on Nov 29, 2001 at 19:15 UTC | |
by IlyaM (Parson) on Nov 30, 2001 at 23:27 UTC | |
by Biker (Priest) on Dec 03, 2001 at 13:26 UTC |