in reply to list of hashrefs?

Another approach would be to read the whole dataset in one fell swoop:
$array = supersplit( $separator, \*DATA); #// not needed here
and than use the first line for your fields as in: @fields = @{ shift( @$array ) }; of course store the indici %indici{@fields} = 0..$#fields; an item is retrieved like: $item = $array[$row][$indici{$thefield}];or even with
$item = fetchit( $row, $thefield ); sub fetchit{ $r = shift; $f = shift; $array[$r][$indici{$f}]; }
Hope this helps,

Jeroen

Oh yeah, supersplit ca be found here.
"We are not alone"(FZ)