sub f { my(%h,$y);my$k=my$x=shift;while($y=shift){if($y eq'=>'){pop@{$h{$k}};$k=$x;$y=shift;}push(@{$h{$k}},$y);$x=$y;}return\%h; }