in reply to CSV and regex mixups
my $csv = Text::CSV_XS->new( ); [download]
I have parsed and output nastier data than you have described here with this module. All escaping handled by the module.