in reply to print line not showing up
How are you reading the CSV? You might want to use Text::CSV_XS, and check the status after reading each line, as in:
#!/perl/bin/perl use strict; use warnings; use Text::CSV_XS; my $csv = Text::CSV_XS->new( { binary => 1 } ); my $infile = "foo.txt"; open(IFH, "<", $infile) or die "Could not open infile for reading.\n"; while(my $line = <IFH>) [ my $success = $csv->parse($line); if ($success) { ... stuff it in your hash ... } else { ... complain about it ... } } close IFH;
This splits the troubleshooting in half, since it's not clear whether the problem arises from the CSV parsing or in the hash insertion.
Good luck!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print line not showing up
by Anonymous Monk on Oct 30, 2007 at 14:46 UTC | |
by thezip (Vicar) on Oct 30, 2007 at 16:41 UTC |