[mdlug] [TECH SUPPORT] How to count perl NCSL

Robert Meier list1c30fe42 at bellsouth.net
Mon Feb 25 22:01:41 EST 2008


Michael,

> To count noncomment lines (including blank lines):
> egrep -cv '^[[:space:]]*#' yourscript.pl

Thank you.

That is a reasonable approximation.

Is there a tool, that parses perl to handle
other forms of comments (e.g. perldoc) and non-comments (e.g. #s in quotes)?

Has anyone used sclc (http://www.cmcrossroads.com/bradapp/clearperl/sclc.html)?

TIA,
-- 
Bob

  "From now on we live in a world where man has walked on the Moon.
   It's not a miracle; we just decided to go."
     -- Tom Hanks



More information about the mdlug mailing list