P is for Practical | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
What about the all too (perhaps not completely understood by me) easy
print "Total lines in $0: ". __LINE__ ."\n"; Could you just put that at the end of your script? That would give you your line count wouldn't it? Although I admit that the original question is a very good one and one that I am quite interested to see a more "official" answer to. I am still quite new to Perl and I do the wc route to getting my line counts for my scripts. Actually, I do something closer to: $ egrep -v "^#" script.pl | wc -l or something more informative...
Which would at least give me my actual lines of code minus my comments. I just finished a script that was 1/3 comments.
----------
In reply to Re: Re: Line-counts of perl programs/modules
by snafu
|
|