At 06:05 PM 6/26/01 -0400, Gross, Stephan wrote:
>Why is this style
>
>if ($x) {
>     do this;
>     do that;
>}
>
>typically preferred over
>
>if ($x)
>{
>    do this;
>    do that;
>}
>
>I like the latter example because it's easier to cut and paste the braces
>and everything in between.  I also think it looks better.  But none of the
>top programmers ever seems to do this.
>Just wondering...

Use either style as long as you're consistent.  I prefer the second 
myself.  If you look hard enough, you can find it in either the 
documentation or an O'Reilly Perl book (I forget which, but I've seen it).

You've nothing to worry about if this is your most pressing style 
question.  I get people in my classes who think leading white space is a 
waste of disk, or something...

--
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com

Reply via email to