- or download this
foreach $word(@words){
$Counter = $Counter+1;
#print("$word\n");
}
- or download this
my $count = scalar @words;
# style pointer: it is a $count not a $Counter
- or download this
# not very useful
my $last = $#words;
# very useful
for(0..$#words) { ... }