From: Ian Jackson Date: Fri, 6 Jan 2012 01:09:21 +0000 (+0000) Subject: Commods: strip whitespace from ends of stall names in tsvs (!) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=e0ceea9c5d3db8ff5f0c9fb6d5dbe975f0c1f057;ds=sidebyside Commods: strip whitespace from ends of stall names in tsvs (!) (cherry picked from commit a203bc7861fa98862f6b887d07fe824d790e001b) --- diff --git a/yarrg/Commods.pm b/yarrg/Commods.pm index f3ae56f..4267034 100644 --- a/yarrg/Commods.pm +++ b/yarrg/Commods.pm @@ -425,6 +425,7 @@ sub check_tsv_line ($$) { $l !~ m/\P{IsPrint}/ or &$bad_data('nonprinting char(s)'); my @v= split /\t/, $l, -1; @v==6 or &$bad_data('wrong number of fields'); + $v[1] =~ s/^\s+//; $v[1] =~ s/\s+$//; # ooo don't check :-( my ($commod,$stall) = @v; !keys %commods or