Paul Seamons skribis 2005-04-15 12:16 (-0600): > For the given example, your code fits perfectly. A more common case I have > had to deal with is more like this: > my %h = <a 1 b 2 c 3> > my %other = <a one b two>; > { > temp %h{$_} = %other{$_} for %other.keys;
Either temp %h; %h{$_} = %other{$_} for %other.keys; or temp %h; %h{ %other.keys } = %other.values; or even temp %h{ %other.keys } = %other.values; should work well already? > %h.say; > } I think it's hard to find an example that can't easily be rewritten as something that already works. Gather/take solves most. Juerd -- http://convolution.nl/maak_juerd_blij.html http://convolution.nl/make_juerd_happy.html http://convolution.nl/gajigu_juerd_n.html