in reply to How to create a hash from string
Or this:
UPDATE:use warnings; use strict; use Data::Dumper; my %h = map $_ => split/:|,/ => 'x:q,y:u,z:n'; { local $Data::Dumper::Sortkeys = 1; ## Update print Dumper \%h; }
In the solution, map is not even needed. Without it, you still have your solution.
choroba caught that!
If you tell me, I'll forget.
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
If you show me, I'll remember.
if you involve me, I'll understand.
--- Author unknown to me
In Section
Seekers of Perl Wisdom