sub python_zip(\@\@;\@\@\@) { # Add more \@ to taste my $short = min(map(scalar(@$_), @_)); return &zip(map(@$_ == $short ? $_ : [@$_[0..$short-1]], @_)); }
In reply to Re^2: equivalent of python's zip in perl
by Anonymous Monk
in thread equivalent of python's zip in perl
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |