perchance has asked for the wisdom of the Perl Monks concerning the following question:
Does anybody know if Perl retains the index for a current line? Maybe something like the $; variablefor my $i ( @list ) { print $i; # Now I want to know what number item I'm at }
10x,
perchance
--- Half A World Away
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Index in For loop
by tachyon (Chancellor) on Jun 27, 2001 at 18:21 UTC | |
|
Re: Index in For loop
by jeroenes (Priest) on Jun 27, 2001 at 18:31 UTC | |
|
Re: Index in For loop
by c-era (Curate) on Jun 27, 2001 at 17:53 UTC | |
|
Re: Index in For loop
by clintp (Curate) on Jun 27, 2001 at 17:54 UTC | |
|
Re: Index in For loop
by wog (Curate) on Jun 27, 2001 at 17:56 UTC | |
|
Re: Index in For loop
by Abigail (Deacon) on Jun 28, 2001 at 02:35 UTC | |
|
(Correction): Index in For loop
by perchance (Monk) on Jun 27, 2001 at 17:57 UTC |