On Mon, 9 Dec 2002, Komtanoo Pinpimai wrote:
>       Is there the "iterator variable" for "for or foreach" loop ?
>       At this present, when I need access to get current index of
>       an array when looping with for, I do this
>
>       my $counter=0;
>       for (@array) {
>               #do something
>
>               print $another_array[$counter];
>               ++$counter;
>       }

Like in C:

for (my $counter=0; $counter < @array; $counter++) {
    $array[$counter];
}

_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to