in reply to Re: Re^2: Keeping a Count in foreach
in thread Keeping a Count in foreach
use English; sub ONE() {1} sub ZERO() {0} for my $each (@strings) { print( ( ( $INPUT_LINE_NUMBER or ONE ) .. ( $INPUT_LINE_NUMBER and ZERO ) ) - ONE, ' ', $each, $INPUT_RECORD_SEPARATOR, ); }
~Particle *accelerates*
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re^4: Keeping a Count in foreach
by YuckFoo (Abbot) on Jun 18, 2002 at 17:40 UTC | |
by particle (Vicar) on Jun 18, 2002 at 18:17 UTC | |
by metadoktor (Hermit) on Jun 21, 2004 at 21:46 UTC | |
by runrig (Abbot) on Jun 21, 2004 at 22:22 UTC |