open(INFILE,"<$cvsDir/$file") || die("can't open datafile $file: $!"); $csv = Text::CSV_XS->new(); while() { $status = $csv->parse($_); if ($status == 0) { $bad_argument = $csv->error_input(); print "\t\tBad Argument: $bad_argument\n"; exit; } ... stuff it in my hash ...