You can read more about it in for vs foreach.@array = 0..100; foreach $item (@array){ $item += 10 if $item <100; } print join "\n", @array; #prints the numbers 10 to 109 and 100
Jeroen
"We are not alone"(FZ)
Update: For clarity, for and foreach *are*
synonyms. It's just a matter of convention....
In reply to Re: Re: hashes of arrays
by jeroenes
in thread hashes of arrays
by mbond
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |