I have read something but could not find an answer:
I had to do a foreach like this:

A------------------------------------
@a = ("a","b","c","d","e");

foreach $b (reverse @a) {
    print "$b\n";
};

Now i needed to access the index inside the foreach to do:
B------------------------------------
@a = ("a","b","c","d","e");

foreach $b (reverse @a) {
    print "$index $b\n";
};

which i did with a additional variable
C------------------------------------
@a = ("a","b","c","d","e");
$index =0;
foreach $b (reverse @a) {
    $index++;
    print "$index $b\n";
};

Is there a way to acces the internal index of the foreach loop as $index in 
example "B" ?

Thanks in advance 
Matth

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to