perlquestion
7stud
<p>Dear Monks,</p>
<p>This is what I get when I try to use pairwise() in List::MoreUtils,</p>
<code>
use strict;
use warnings;
use 5.010;
use List::MoreUtils;
my @arr1 = (1, 2, 3);
my @arr2 = (10, 20, 30);
my %hash = pairwise { ($a, $b) } @arr1, @arr2;
use Data::Dumper;
say Dumper(\%hash);
--output:--
Name "main::b" used only once: possible typo at 1perl.pl line 10.
Name "main::a" used only once: possible typo at 1perl.pl line 10.
Can't call method "pairwise" on an undefined value at 1perl.pl line 10.
</code>