Maybe you've already determined the cause of your problems, but there is one potential difference between wc -l and print scalar @array:
In your code, you skip empty lines:
next if ($line =~ /^\s*$/);
... but wc -l will count these. I would keep separate counts for all types of lines encountered and output these as statistics.
In reply to Re: Double-bytes handling with Perl
by Corion
in thread Double-bytes handling with Perl
by fredo2906
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |