Skip to content

Instantly share code, notes, and snippets.

@markusfisch
Created October 30, 2013 11:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save markusfisch/7231285 to your computer and use it in GitHub Desktop.
Save markusfisch/7231285 to your computer and use it in GitHub Desktop.
Count the number of semicolons in a source file. This is a better (though still imperfect) approach to measure the complexity of a project than simply counting lines.
#!/usr/bin/env perl
print join( '', <STDIN> ) =~ tr/;// . "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment