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


in reply to Re: regular expression (search and destroy)
in thread regular expression (search and destroy)

Text::CSV_XS does handle embedded new lines indeed, you just have to configure your new object properly using the binary option.

I quote from the man page:

binary

    If this attribute is TRUE, you may use binary characters in quoted fields,
    including line feeds, carriage returns and NUL bytes. (The latter must
    be escaped as "0.) By default this feature is off.

I find Text::CSV_XS to be a nice solution, I never had problems once I set up object attributes correctly. Performance wise is ligthing speed, especially using the print and getline methods.


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g