Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    use 5.012;
    ...
    while ( my ($f, $s) = $ea->() ) {
        say "First: $f -> second: $s"
    }
    
  2. or download this
    First: 1 -> second: a
    First: 2 -> second: b
    First: 3 -> second: c
    First: 4 -> second: d
    First: 5 -> second: e
    First: 6 -> second: f
    
  3. or download this
    use strict;
    use 5.012;
    use List::MoreUtils qw/pairwise/;
    ...
    my @second = qw/a b c d e f/;
    
    pairwise { say "First: $a -> second: $b" } @first, @second;