Re:Why I Use Perl: Reliability
by jbert on Tuesday May 29, 2012 @04:58PM
(#4039853)
My production style is happy to use:
$output *= $_ for (1..$n)
and you're right to call me on it. If I am writing a multi-line for loop, I do like to name the loop var though.
I think this is an interesting point (in a discussion about readability), do non-perl coders think the one-liner (with 'for' suffix) is more or less readable?
(I also prefer explicit return for maintenance reasons, except possibly in one-line subs)
I think this is an interesting point (in a discussion about readability), do non-perl coders think the one-liner (with 'for' suffix) is more or less readable?
(I also prefer explicit return for maintenance reasons, except possibly in one-line subs)