in reply to Filling an array
The $i variable (used as an incrementer) and the foreach merely proves the map statement.$value=" 1 "; @array=map {$_=$value} (1..100); $i=0; foreach (@array) { print "$i $_\n"; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(zdog) Re: (2) Filling an array
by zdog (Priest) on Sep 07, 2001 at 04:27 UTC | |
by spartan (Pilgrim) on Sep 10, 2001 at 19:50 UTC |