From 460352b7c4cd4b8d76481ba4d0c6ccc28c7b964d Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Fri, 9 Dec 2016 13:47:02 -0800 Subject: [PATCH] Ignor blank lines and comments in the inventory. --- scripts/t-shirt-label-print.plx | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/t-shirt-label-print.plx b/scripts/t-shirt-label-print.plx index 81f970c..304d37a 100644 --- a/scripts/t-shirt-label-print.plx +++ b/scripts/t-shirt-label-print.plx @@ -25,6 +25,7 @@ open(SIZE_COUNTS, "<", $SIZE_COUNTS); my %sizeCounts; while (my $line = ) { + next if ($line =~ /^\s*#/ or $line =~ /^\s*$/); if ($line =~ /^\s*(\S+)\s+(\d+)\s*/) { my($size, $count) = ($1, $2, $3); $sizeCounts{$size} = $count;