in reply to Re: equivalent of python's zip in perl
in thread equivalent of python's zip in perl

Eh, you ask Perl monks about python, you can't be surprised when they get the details wrong... To replicate the python zip's behavior:
sub python_zip(\@\@;\@\@\@) { # Add more \@ to taste my $short = min(map(scalar(@$_), @_)); return &zip(map(@$_ == $short ? $_ : [@$_[0..$short-1]], @_)); }