Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Which of the following is a typical way of writing Perl code?Is any one of them more "correct" than the other?print 1..10; print for (1..10); for (1..10) {print;}
Relatedly, is it more common to have a space between "for" and the open bracket "("?
Thanks in advance.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Question on syntax
by pc88mxer (Vicar) on Apr 23, 2008 at 02:45 UTC | |
|
Re: Question on syntax
by j1n3l0 (Friar) on Apr 23, 2008 at 09:36 UTC | |
by Porculus (Hermit) on Apr 23, 2008 at 20:41 UTC | |
|
Re: Question on syntax
by grizzley (Chaplain) on Apr 23, 2008 at 09:51 UTC | |
|
Re: Question on syntax
by mscharrer (Hermit) on Apr 23, 2008 at 08:33 UTC | |
by ikegami (Patriarch) on Apr 23, 2008 at 08:38 UTC | |
by mscharrer (Hermit) on Apr 23, 2008 at 09:09 UTC | |
|
Re: Question on syntax
by Anonymous Monk on Apr 23, 2008 at 04:21 UTC |