in reply to split on the pattern of '),('

no, you need to use Text::CSV or Text::xSV

Examples at

Replies are listed 'Best First'.
Re^2: split on the pattern of '),('
by Anonymous Monk on Jun 07, 2012 at 20:06 UTC

    It is "workable" but kinda meh

    #!/usr/bin/perl -- use strict; use warnings; use Text::CSV; use Data::Dump; my $str = '(1,"(text)", 123),(2,"(string)", 234),(...)'; my $csv = Text::CSV->new( { quote_char => '"', sep_char => ',', allow_loose_escapes => 1, empty_is_undef => 1, binary => 1, auto_diag => 1, } ); $csv->parse( $str ); dd [ $csv->fields() ]; __END__ ["(1", "(text)", " 123)", "(2", "(string)", " 234)", "(...)"]