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++; }
In reply to Re: Filling an array
by spartan
in thread Filling an array
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |