in reply to Re^2: splitting directly to hash
in thread splitting directly to hash
In your case all you need to do is to build an even sized list that can be assigned to a hash:print map { $_, $_, $_ } (1, 2, 3); #111222333 print map { ($_) x $_ } (1, 2, 3); #122333
The above is the same asprint map { $_, ' ') } (1, 2, 3); #1 2 3
print map { $_ => ' ' } (1, 2, 3); #1 2 3
|
|---|