Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Re: Line-counts of perl programs/modules

by snafu (Chaplain)
on May 02, 2001 at 11:23 UTC ( #77255=note: print w/replies, xml ) Need Help??


in reply to Re: Line-counts of perl programs/modules
in thread Line-counts of perl programs/modules

Why are you counting your close curly braces? Wouldn't it be better to just count the ';'s? If you are like me and comment a lot (even comment out lines of code for later use) you might want to grep out the '#'s too then count the ';'s.

I still can't think of why you would count the close curlies though.

egrep -v '^#' file | egrep -e ';$' | wc -l

----------
- Jim

Replies are listed 'Best First'.
Re: Re: Re: Line-counts of perl programs/modules
by Tarka (Novice) on May 07, 2001 at 03:05 UTC
    I count the braces so that conditionals and loops count as a line apeice. Admittedly that pulls in subs too (and anonymous hashes, if their closing brace doesn't end on the same line as the semi). It's just a personal preference.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://77255]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2022-08-18 04:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?