On 2014-10-08 10:19, H.Merijn Brand via RT wrote:
Show quoted text> Is using ScalarIO an option?
>
> open my $fh, "<", \$data
> my $r = $csv->getline_hr ($fh);
Obviously this would work, but one would think that it would be natural
to have parsing as a function and then build getline_hr to use it.
I actually ended up using a hash slice, something like:
$csv->parse($data);
my %r;
@r{ @column_names } = ($csv->fields);
--
Otto J. Makela
CSC - Tieteen tietotekniikan keskus (IT Center for Science)
PO Box 405/Keilaranta 14, FI-02101 Espoo, Finland
tel. +358 40 7655772