in reply to equivalent of python's zip in perl

...and, there is a zip built-in function in Perl 6, for example:
for zip(@names, @files, @cats) -> $name, $file, $cat {…}


(Wow, I got the Perl 6 reply in before moritz!)

Replies are listed 'Best First'.
Re^2: equivalent of python's zip in perl
by moritz (Cardinal) on Nov 22, 2010 at 08:33 UTC
    There's also an infix Z operator (which is implemented in Rakudo, but works only with two lists at the moment):
    my %h = <a b c d e f g> Z (1, 2 ... *); # or as a meta operator: # infix ~ is string concatenation my @list = <a b c d> Z~ (1, 2 ... *); # @list is now ('a1', 'b2', 'c3', 'd4')