<FONT face="Default Sans Serif, Verdana, Arial, Helvetica, sans-serif" size=2><DIV><FONT face="OCR A Extended">1) variable names<BR>Just saw at the O'Reilly OSCON site that mixed case is called "CamelCase"</FONT></DIV><DIV><FONT face="OCR A Extended">(from the wiki, which has great links to the slides etc. from many of the presentations:</FONT></DIV><DIV><A href="http://wiki.oreillynet.com/oscon/index.cgi" target=blank>http://wiki.oreillynet.com/oscon/index.cgi</A></DIV><DIV>though not D. Conway's "Style" or his&nbsp;other sessions). Personally, I use all lower case and underscores for vars but balk at $the_last_counter_for_session_resets sort of wordy-ness. One, maybe 2 underscores at most.&nbsp; Camelcase seems less readable or ... less something, for vars.</DIV><DIV><FONT face="OCR A Extended">2) function names</FONT></DIV><DIV><FONT face="OCR A Extended">Functions I can live w/ a mixed case, or even any use of initial/any upper case. It can help distinguish the first glance parsing (akin to "shorts for sex" - much as I hate to admit it, that's the parse I saw too) of code function/var-wise.<BR>3) the "{" after a function</FONT></DIV><DIV><FONT face="OCR A Extended">I always put it on&nbsp;a line by itself. I try to always comment the matching close curly:</FONT></DIV><DIV><FONT face="OCR A Extended">sub foo</FONT></DIV><DIV><FONT face="OCR A Extended">{</FONT></DIV><DIV><FONT face="OCR A Extended">...</FONT>&nbsp;</DIV><DIV><FONT face="OCR A Extended">}&nbsp; #&nbsp;&nbsp; sub foo</FONT><BR></DIV><DIV>likewise, close for/while/if/else close curlies get comments</DIV><DIV>if ( $foo =~ /bar/ ) {</DIV><DIV>...</DIV><DIV>&nbsp;} else {&nbsp; # if foo =~/bar/</DIV><DIV>...</DIV><DIV>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if foo =~ /bar/</DIV><DIV>&nbsp;</DIV><DIV>while (&lt;&gt;) {</DIV><DIV>...</DIV><DIV>}&nbsp;&nbsp;&nbsp; # while &lt;&gt;</DIV><DIV>&nbsp;</DIV><DIV>etc.&nbsp; I try to put the curly on the same line as the if, unless there's multiple conditionals, and bracket/"kiss" an "else" but,&nbsp;if there's 2 or more&nbsp;conditional clauses, I try to re-think the block.&nbsp; Generally speaking I do something unsupportable like:</DIV><DIV>if (&nbsp;&nbsp;&nbsp;&nbsp;($foo and $foo eq "bar") </DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; or ($baz and $baz &gt; 3) </DIV><DIV>&nbsp;&nbsp; )&nbsp; {</DIV><DIV>but more often I find it often means I'm mushing $foo and $baz together improperly.&nbsp; Linked as they may seem at the moment (esp. if you add a $bum in there) growth will bring up the case where $foo eq bar but $baz &lt; 3.&nbsp; Not necessarily pretty or efficient but:</DIV><DIV>if ( $foo and $foo eq "bar" ) {</DIV><DIV>&nbsp;&nbsp; if ( $baz and $baz &gt; 3 ) {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; ...</DIV><DIV>&nbsp;&nbsp; }&nbsp;&nbsp;else {&nbsp;&nbsp;&nbsp; # if baz &gt; 3</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; ...</DIV><DIV>&nbsp;&nbsp;&nbsp;}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if baz &gt; 3</DIV><DIV>} else {&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if foo eq bar</DIV><DIV>&nbsp;&nbsp; ...&nbsp;&nbsp;&nbsp; # may include $baz tests, duplicates even</DIV><DIV>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if foo eq bar<BR></DIV><DIV>and, of course, building&nbsp; debug and debug levels in at creation time:</DIV><DIV>my $debug = 10;</DIV><DIV>while (&lt;&gt;) {</DIV><DIV>&nbsp; print STDERR "Got: $_" </DIV><DIV>&nbsp;&nbsp;&nbsp; if $debug &gt; 8;</DIV><DIV>&nbsp; if ( /tcp (.*) found/ ) {</DIV><DIV>&nbsp;&nbsp;&nbsp; print STDERR "TCP: $1\n"</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if $debug &gt; 4;</DIV><DIV>&nbsp;&nbsp;&nbsp; ...</DIV><DIV>&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if /tcp found/</DIV><DIV>&nbsp; if ( /udp (.*) found/ ) {</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; print STDERR "UDP: $1\n"</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if $debug &gt; 4;</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp; ...</DIV><DIV>&nbsp;&nbsp; }&nbsp;&nbsp;&nbsp;&nbsp; # if /udp found/</DIV><DIV>&nbsp;</DIV><DIV>}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # while &lt;&gt;</DIV><DIV>&nbsp;</DIV><DIV>Not trying to win converts, just the 'style' (no kahki's, no collared short-sleeve shirts unless I have a meeting, but no ZZ Top beards either) I'm hoping to&nbsp;maintain.</DIV><DIV>&nbsp;</DIV><DIV>a<br><br>Andy&nbsp;Bach,&nbsp;Sys.&nbsp;Mangler<br>Internet:&nbsp;andy_bach@wiwb.uscourts.gov&nbsp;&nbsp;&nbsp;&nbsp;<br>VOICE:&nbsp;(608)&nbsp;261-5738&nbsp;&nbsp;FAX&nbsp;264-5932<br><br>"Whereof&nbsp;we&nbsp;cannot&nbsp;speak,&nbsp;thereof&nbsp;we&nbsp;should&nbsp;remain&nbsp;silent."&nbsp;L.&nbsp;Wittgenstein<BR></DIV></FONT>