I keep my loops as short as I can, so the former. I usually feel the need for the latter if I already use $_ elsewhere but that's often a sign that I need to simplify.
The former. I used the latter when it first became available but got bitten by having to run stuff with an older Perl..
The latter, no question. Self documenting.
I always shift $self. Occasionally I shift other stuff when I want to work with the rest of @_. Otherwise, which is 98% of th time, the former.
for. I only use for(;;) when I'd have to while(){} continue{}, which so far is never.
The former except for once in a blue moon when there are precendence issues.
The former, unless it's a oneliner where the shell gets the single quotes.
The former. Angle brackets are for reading a filehandle in my world.
See above; the latter.
Always the latter when I don't need the elements in a certain order - for data munging I rarely do. The former tends to show up in I/O related code most of the time which plays along nicely with efficiency concerns, as I/O is usually constrained by external factors anyway.
Makeshifts last the longest.
In reply to Re: Style, style, style
by Aristotle
in thread Style, style, style
by Juerd
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |