|
|
| laziness, impatience, and hubris | |
| PerlMonks |
Re: number array with spaceby 2teez (Vicar) |
| on Jun 20, 2013 at 05:42 UTC ( [id://1039885]=note: print w/replies, xml ) | Need Help?? |
|
Hi MynameisAchint, Update: However, if you want to iterate over the array, using the index of the array, Perl also does that for you very cleanly.
Please, note that I used foreach and for inter-changeably. And please don't forget that array index start from 0 and not 1, as used in your OP for loop. Hope this helps
If you tell me, I'll forget. If you show me, I'll remember. if you involve me, I'll understand. --- Author unknown to me
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||||||||||||||||||