cheako has asked for the wisdom of the Perl Monks concerning the following question:

What's your fav read/write iterator for a hash's values?

Temperature:
foreach (keys %temp) { $temp{$_}-=32; $temp{$_}*=5/9; }

Percent:
foreach (keys %ratio) { $ratio{$_}*=100; }

Replies are listed 'Best First'.
Re: Converting hash values from fahrenheit to celsius.
by hdb (Monsignor) on Apr 14, 2015 at 13:53 UTC

    My favorite would be

    $_-=32, $_*=5/9 for values %temp;
Re: Converting hash values from fahrenheit to celsius.
by Corion (Patriarch) on Apr 14, 2015 at 13:47 UTC

    If you don't care about the keys, why not use values instead?