in reply to Re^3: csv to hash table
in thread csv to hash table
Why => in split /$field_separator/ => $record? To my eye that says paired item, but there it's just a plain ol' comma and would be clearer as:
my @fields = split /$field_separator/, $record;
Personally I prefer making the record variable explicit, but I'd write the while expression as:
while (defined (my $record = <$filehandle>)) {
which is a closer match to the magic you get with while (<$filehandle>) {.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: csv to hash table
by kcott (Archbishop) on Nov 20, 2013 at 06:18 UTC |