which then gives the braces the same relative position fo the if and the else.rather than this: } else { use this: } else {
I see others have pointed out some different approaches to dealing with filehandles and the like. Only other suggestion I would make is to use CGI more effectively by not printing HTML directly - always use CGI/This: unless ( scalar(@downhosts) == 0 ) { print p, "There $verbage[2] ", scalar(@downhosts), " $verbage[3] +unreachable\n", br; } rather than: unless ( scalar(@downhosts) == 0 ) { print p, "There $verbage[2] ", sc +alar(@downhosts), " $verbage[3] unreachable\n", br }
And finally, use perltidy. I have it in the toolbox in my Komodo so I can run it over my code any time. It actually mkes it easier to spot problems when I can see thngs like the indentation level go wrong! It also gives me a consistency of style I am too lazy to get any other way.
In reply to Re: improving the aesthetics of perl code
by jdtoronto
in thread improving the aesthetics of perl code
by tcf03
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |