in reply to multiply hash values

Fore.

my %h = qw( a 1 b 2 c 3 ); @h{ keys %h } = map { $_ * 4 } values %h;

Update: True. And the subsequent followup's still verbose: $_*=4for values%h; :)

Replies are listed 'Best First'.
Re^2: multiply hash values
by shenme (Priest) on Oct 27, 2004 at 23:34 UTC
    Ooops, you used too big a club ...
    my %h = qw( a 1 b 2 c 3 ); map { $_ *= 4 } values %h;
      $_ *= 4 for values %h;
        You can cut that swing a little closer.
        #23456789_1 $_*=4for%h;