- or download this
my @arr = qw/1 2 3 4 5 6 7 8/;
while(my ($x,$y) = splice @arr,0,2) {
say "$x => $y";
}
- or download this
my @arr = qw/1 2 3 4 5 6 7 8/;
...
for(keys %hash) {
say "$_ => $hash{$_}"
}
- or download this
1 => 2
3 => 4
7 => 8
5 => 6
- or download this
my @arr = qw/1 2 3 4 5 6 7 8/;
push @arr, undef;
...
for(@{$x}){
say $_ ." => " . $y->[$i++] if($_);
}