Ignor blank lines and comments in the inventory.
This commit is contained in:
parent
26c7e938ff
commit
460352b7c4
1 changed files with 1 additions and 0 deletions
|
@ -25,6 +25,7 @@ open(SIZE_COUNTS, "<", $SIZE_COUNTS);
|
||||||
|
|
||||||
my %sizeCounts;
|
my %sizeCounts;
|
||||||
while (my $line = <SIZE_COUNTS>) {
|
while (my $line = <SIZE_COUNTS>) {
|
||||||
|
next if ($line =~ /^\s*#/ or $line =~ /^\s*$/);
|
||||||
if ($line =~ /^\s*(\S+)\s+(\d+)\s*/) {
|
if ($line =~ /^\s*(\S+)\s+(\d+)\s*/) {
|
||||||
my($size, $count) = ($1, $2, $3);
|
my($size, $count) = ($1, $2, $3);
|
||||||
$sizeCounts{$size} = $count;
|
$sizeCounts{$size} = $count;
|
||||||
|
|
Loading…
Reference in a new issue