Subject: | each_arrayref Segfaults if either argument is undefined |
each_arrayref segfaults if either argument is undefined.
The output of attached code is shown below as an example:
dlarochelle@dlarochelle-OptiPlex-990:~/dev_scratch$ perl eacharray_ref_test.pl
starting
starting loop
Segmentation fault (core dumped)
Subject: | eacharray_ref_test.pl |
#!/usr/bin/env perl
use List::MoreUtils qw ( each_arrayref );
my $arr1 = [ '1', '2', '3' ];
my $arr2;
say STDERR "starting";
my $ea = each_arrayref ( $arr1, $arr2 );
say STDERR "starting loop";
while ( my ( $a, $b ) = $ea->() )
{
say STDERR "$a $b";
}