Subject: | Feature request: want_fields by name |
Date: | Tue, 14 Sep 2010 11:18:49 +0100 |
To: | bug-Text-CSV-Simple [...] rt.cpan.org |
From: | Sam Duke <sod20 [...] cam.ac.uk> |
I think it is fairly common to have a CSV file with the first line
being a list of headings. I am using want_fields to select the
appropriate columns, but it would be great to select the correct ones
based on a name.
Alternatively, if I could just tell the parser to parse the first line
so that I can hunt for the index of the correct headings and then go
ahead and do a full parse, that would be great. Or even just a
'before_loop' trigger before foreaching through the lines, just before
this line: "foreach my $line (@lines) {" would make this possible...
Otherwise, this is a great module!
Sam
ps. eg of the type of CSV file i mean:
Name, Value, Result
Box,3,pass
Table,4,fail