Help for this page

Select Code to Download


  1. or download this
    sub zip {
        my ($ref1, $ref2) = @_;
        my @zip;
    ...
    while (my ($item, $element) = splice @zip => 0, 2) {
        print "$x: $item $y: $element\n";
    }
    
  2. or download this
    for zip(@a,@b) -> $item, $element {
        say "$x: $item $y: $element";
    }