in reply to Re^2: Improved regexp sought
in thread Improved regexp sought

use Text::CSV_XS. I guessed that your lines were terminated with apostrophe + newline. Alter the code to fit.

use Text::CSV_XS; my $parser = Text::CSV_XS->new( { eol => "'\n", escape_char => "'", sep_char => "+" } ); while ( my $line = <$fh> ) { $parser->parse( $line ); print join( ", ", $parser->fields ) . "\n"; }