Perl has a term called foreach. it works like this:
foreach $element (@array){dostuff.....;}
foreach takes the first element of array, makes $element a reference to that value, and does the loop. it does the next location next, and so on until the array is done.
example @numbers=(1,2,3,4,5); foreach $digit (@numbers){print "$digit\n";} This prints: 1 2 3 4 5