http://www.perlmonks.org?node_id=898947


in reply to Remove tabs only between quotation marks

Try using something like Text::CSV or the like and let it handle the nastiness of parsing the CSV-y data for you (just tell it to use \t as the delimiter rather than a comma) then do your diddling on the chunks it returns.

The cake is a lie.
The cake is a lie.
The cake is a lie.