use Text::CSV; $csv = Text::CSV->new(); # create a new object $status = $csv->parse($line); # parse a CSV string into fields @columns = $csv->fields(); # get the parsed fields