santhosh_89 has asked for the wisdom of the Perl Monks concerning the following question:
I have a scalar variable,I need to be splited based on the comma(,).if the comma is present with in double or single quote.The split or regular expression should not consider it.
Input: my $a="a,b,\"c,d\""; There is a comma with in c and d.The code should not be considered that comma(,),The output should be as following. output of Dumper:$VAR1=[ a, b, \"c,d\" ]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Split process
by moritz (Cardinal) on Aug 04, 2009 at 06:22 UTC | |
|
Re: Split process
by Skeeve (Parson) on Aug 04, 2009 at 06:31 UTC |