in reply to Re^4: How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?
in thread How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?
I don't want to get hung up on loops as that is just one C-style construct under discussion. Also, I don't want to be in the position of having to defend C. Especially on a site called "PerlMonks".
That said, I agree most of what you said above. Although, I think that people who natively think in C don't have any problems reading
. For a native C thinker to make a mistake with that construct is pretty rare.for ($i = 0; $i < $BLAH; ++$i) { ...}
But when you have the luxury of perl and you aren't forced to use C constructs, why not use
I agree completely. It's the better solution. But my point is I wouldn't wring my hands over using the C construct if you don't normally make mistakes with it.for my $foo (@bar) { . . . }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^6: How do I train myself to write more Perl-ish Perl, rather than C-ish Perl?
by GrandFather (Saint) on Dec 14, 2007 at 02:44 UTC |