The stupid question is the question not asked | |
PerlMonks |
Re: Re: Line-counts of perl programs/modulesby snafu (Chaplain) |
on Apr 27, 2001 at 17:31 UTC ( [id://76077]=note: 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 Section
Seekers of Perl Wisdom
|
|