http://qs321.pair.com?node_id=214564


in reply to Re: Re^3: The Cost of Nested Referencing
in thread The Cost of Nested Referencing

Why? What's more readable about
foreach my $foo (@bar) { do_something($foo); }
than do_something($_) foreach @bar; ? All I see is twice as much to type and read with absolutely no difference to the clarity. Especially when you nest a few of those and it ends up something like
for $blah (@blah) { # ... # ... # ... if($whatever) { last; } while($foo) { if(@bar) { # ... while($baz) { # ... # ... # ... } if($whatever) { next; } elsif($snafu) { last; } else { # ... } # ... # ... } # ... } } # ... # ... }
It's atrocious. Please use a few last if ... and spare me the effort of having to eyeparse 15 levels of indentation.

Makeshifts last the longest.