From: miker Date: Wed, 3 Oct 2007 18:27:01 +0000 (+0000) Subject: clean up ids read from file X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=6e7cc704f37a7b5e4117bef877eafaa0ce0a1057;p=Evergreen.git clean up ids read from file git-svn-id: svn://svn.open-ils.org/ILS/trunk@7860 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm index 6e4aa90b10..76ea0b5a00 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm @@ -65,9 +65,13 @@ sub handler { my $csv = new Text::CSV; while (<$file>) { + chomp; $csv->parse($_); my @data = $csv->fields; - push @records, $data[$col]; + my $id = $data[$col]; + $id =~ s/\D+//o; + next unless ($id); + push @records, $id; } } }