Ignor blank lines and comments in the inventory.

This commit is contained in:
Bradley M. Kuhn 2016-12-09 13:47:02 -08:00
parent 26c7e938ff
commit 460352b7c4

View file

@ -25,6 +25,7 @@ open(SIZE_COUNTS, "<", $SIZE_COUNTS);
my %sizeCounts;
while (my $line = <SIZE_COUNTS>) {
next if ($line =~ /^\s*#/ or $line =~ /^\s*$/);
if ($line =~ /^\s*(\S+)\s+(\d+)\s*/) {
my($size, $count) = ($1, $2, $3);
$sizeCounts{$size} = $count;