On Sun, 04 Apr 2010 14:22:37 +0300, Jari Aalto <jari.aalto@cante.net> wrote: > Tom Christiansen <tchrist@perl.com> writes: > > > and therefore the parens don't matter. Removing them changes > > nothing and risks no confusion, so it seems cleaner without them. > > Yes, I was referring to the "simple expressions" all the way. When > combining the expressions, that's another matter. But trivial cases I > think it's preferred still: > > for my $item (sort keys {$a <=> $b} %hash) # without extra parens here That won't even parse for my item (sort { $a <=> $b } keys %hash) { : 'sort' takes the block, not 'keys' -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, 11.00, 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, AIX 5.2 and 5.3. http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/Thread Previous | Thread Next