Calculating bytes of code
It's easy to write very ugly Perl code,
but this is pretty nicely written, so congrats.

Using barewords for file handles like this is discouraged:


open(FILE, "&lt;$srcfile") or die "Couldn't open file: $!\n";
my @lines = &lt;FILE&gt;;
# ...
close FILE;



The recommended way:

open(my $fh, "&lt;$srcfile") or die "Couldn't open file: $!\n";
my @lines = &lt;$fh&gt;;
# ...
close $fh;


Some simplifications are possible.
For example instead of this:


my @srcext = ("*.cpp", "*.c");



I find this way a lot easier to type:

my @srcext = qw/*.cpp *.c/;


Another, bigger simplification is in the loops.
Instead of this:


my @lines = &lt;FILE&gt;;
for($b = 0; $b &lt; scalar(@lines); $b++){
    $srcBytes += length($lines[$b]);
    $totLines++;
    if($lines[$b] =~ /^\s$/){ # is only whitespace ==&gt; newLine
        $newLines++;
        next;
    }
    if(($lines[$b] =~ /^\s*\/\//) || # comments only lines
       ($lines[$b] =~ /^\s*\/\*/) ||
       ($lines[$b] =~ /^\s*\*/)){



You can iterate using for (&lt;$fh&gt;) { ... },
and instead of $lines[$b], benefit from the auto-variable $_,
which can be omitted from $lines[$b] =~ /.../ statements,
like this:

for (&lt;$fh&gt;) {
    $srcBytes += length($_);
    $totLines++;
    if(/^\s$/){ # is only whitespace ==&gt; newLine
        $newLines++;
        next;
    }
    if(/^\s*\/\// || # comments only lines
       /^\s*\/\*/ ||
       /^\s*\*/){