$line = $csv->getline($io); # .. some error-handling stuff. for (@$line) { $_ = '' unless defined } #~ @$line = map { defined $_ ? $_ : '' } @$line