From 6e7cc704f37a7b5e4117bef877eafaa0ce0a1057 Mon Sep 17 00:00:00 2001 From: miker Date: Wed, 3 Oct 2007 18:27:01 +0000 Subject: [PATCH] clean up ids read from file git-svn-id: svn://svn.open-ils.org/ILS/trunk@7860 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/perlmods/OpenILS/WWW/Exporter.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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; } } } -- 2.11.0