Permalink
Browse files

* Fixed bug in polling location perl script where headers were not be…

…ing output
  • Loading branch information...
1 parent c1d5f55 commit 81020b3f843cce2222e09bee0fad8645e043ae91 Jared committed Dec 1, 2011
Showing with 5 additions and 5 deletions.
  1. +5 −5 py/polling_parser.pl
View
@@ -94,7 +94,7 @@ sub get_date {
);
# output file
- open my $wh, ">", "$base_dir/polling_location_mod.txt" or die "$base_dir/polling_location_mod.txt: $!";
+ open my $wh, ">", "$base_dir/polling_location.txt" or die "$base_dir/polling_location.txt: $!";
my $csv = Text::CSV_XS->new ({
eol => $/,
sep_char => "|"
@@ -108,9 +108,9 @@ sub get_date {
my @output_line;
# because the reader eats the header, line number starts at '2'
-# if ($. == 1) {
-# print $wh "$polling_headers" . "\n";
-# }
+ if ($. == 1) {
+ print $wh "$polling_headers" . "\n";
+ }
if($csv_line->{'site_type'} eq "P") {
push(@output_line, (
@@ -126,7 +126,7 @@ sub get_date {
}
}
- close $wh or die "localities.txt: $!";
+ close $wh or die "$base_dir/polling_location.txt: $!";
}

0 comments on commit 81020b3

Please sign in to comment.