in reply to small steps toward Perl literacy, temp vars and parentheses

Having dinked around with the example for a bit, I think that the chief reason it is awkward to read is that it's kludgy. You're getting the minimum key value by sorting and indexing, instead of by using a min function.
use List::Util; my $min_key = min(keys %h); %h = ($min_key, $h{$min_key});
That's perfectly clear, efficient, and doesn't involve a lot of slinging data around. If you particularly hate the temp variable, you could obviate it with map (although I find that rather dogmatic):
%h = map { $_, $h{$_} } min(keys %h);
In the same way that variables should have purposeful names, chunks of code should look like what you're trying to accomplish. If there were no min() function already written, you could (and should) easily write your own, rather than inlining everything.

Update: if the issue is improving your ability to read code, well, bad code is always going to be hard to read. You could certainly practice at the Perl Golf site. I think that recognizing why good code is good and why bad code is bad is helpful to your literacy.


We're not really tightening our belts, it just feels that way because we're getting fatter.