in reply to each on reference is experimental at
Hello natxo,
Corion’s solution is preferable, but this does what you want:
#! perl use strict; use warnings; my $HoA = { vowels => [ 'a', 'e', 'i', 'o', 'u', ], primes => [ 2, 3, 5, 7, 11, ], }; { no warnings 'experimental'; while (my ($key, $value) = each $HoA) { print $key . " "; for (@$value) { print "$_ "; } } }
Output:
22:59 > perl 1386_SoPW.pl vowels a e i o u primes 2 3 5 7 11 22:59 >
Hope that helps,
| Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: each on reference is experimental at
by ikegami (Patriarch) on Sep 28, 2015 at 16:45 UTC |