> I've go tired of typing :"), but if I had current index-iterator ( say under
> $i just as example) at hand the way I have $_ i can just type :
>
> print "$_ : $b[$i]\n" for @a;
> OR
> print "$a[$i] : $b[$i]\n" for @a;
>
For a general solution to this see Buddha Buck's RFC on iterators:
How about
print "$a[$_]:$b[$_] for 0..$#a;
or in the p6 case...
print "@a[$_]:@b[$_]" for 0..$#a;
Ilya
-Original Message-
From: raptor
To: [EMAIL PROTECTED]
Sent: 07/18/2001 12:14 PM
Subject: one more nice2haveit
hi,
As I was programming i got again to one thing i
hi,
As I was programming i got again to one thing i alwas needed to have...
especialy when write something fast or debug some result... words comes
about for/foreach and accessing the current-index of the array I'm working
with i.e.
say I have two arrays @a and @b and want to print them (al