T
Tassilo v. Parseval
Also sprach Anno Siegel:
That's clever. But maybe there also should be a zipref() function
(similar to each_array/each_arrayref) without the prototype that expects
explicit array-references.
Tassilo
use warnings;
use strict;
use List::MoreUtils qw(zip);
my %character_value = zip('a'..'z', 1..26);
But as it turns out, there is a subtle distinction between lists and
arrays of which I was not previously aware, and List::MoreUtils::zip
needs arrays:
Then give it arrays:
my %character_value = zip @{ [ 'a' .. 'z'] }, @{ [ 1 .. 26] };
or, overriding the prototype:
my %character_value = &zip( [ 'a' .. 'z'], [ 1 .. 26]);
That's clever. But maybe there also should be a zipref() function
(similar to each_array/each_arrayref) without the prototype that expects
explicit array-references.
Tassilo