Help for this page
my @first = qw/ one-1 two-2 three-3/; my %hash = map { split /-/ } @first; # Which works for me btw print map { "$_ => $hash{$_}\n" } keys %hash;
my @first = qw/ one-1 two-2 three-3/; my @second = map { split /-/ } @first; my %hash = @second; # Legal code, isn't it? print map { "$_ => $hash{$_}\n" } keys %hash;
@second = @first;