#$csvIn is a Text::xSV object. while ($csvIn->get_row()) { my %fields = $csvIn->extract_hash(); # time passes # set nulls to empty string. Have to do this or there will # be problems later printing the data rows. defined($_) or $_ = "" for values %fields; }