- or download this
foreach my $element ( @array ) { ...... }
- or download this
my @newlist = map { ....... } @array;
- or download this
foreach my $idx ( 0 .. $#array ) {
#do something with $array[$idx];
}
- or download this
my @newlist = map { # do something with $array[$_] } 0 .. $#array;
- or download this
package IndexedArray;
...
1;
- or download this
use strict;
...
. "].\n";
}
}