http://qs321.pair.com?node_id=396639


in reply to (Golf!) Re^2: better way to convert a string into an array and an hash
in thread better way to convert a string into an array and an hash

I'm not a golfer, but...

tr/:/,/;%h=eval;@a=keys%h;

Update

y/:/,/;%h=eval;@a=keys%h;

Update 2

If the ordering of @a is important, how about

@a=/(\d+):/g;y/:/,/;%h=eval;