in reply to Checking if line contains a quote

is there any reason why you are not using Text::CSV_XS, Text::CSV or Text::xSV?