in reply to Legible or Obfuscated?
"For each element in the array, print it with a line break."for $element (@array) { print "$element\n"; }
"Print the current temp variable, for each element in the array."print "$_\n" for @array;
It's a combination of having to mentally reverse it, and the use of $_ that makes it less legible. I always use a named variable instead of $_ when I can. It's better documentation.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Legible or Obfuscated?
by demerphq (Chancellor) on Aug 10, 2004 at 22:19 UTC |