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"; }
In reply to Re^3: Improved regexp sought
by diotalevi
in thread Improved regexp sought
by myomancer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |