Pathologically Eclectic Rubbish Lister | |
PerlMonks |
split string using regexby jeanluca (Deacon) |
on Nov 08, 2007 at 14:43 UTC ( [id://649721]=perlquestion: print w/replies, xml ) | Need Help?? |
jeanluca has asked for the wisdom of the Perl Monks concerning the following question:
Dear Monks I need to split a string which more or less looks like The firt example should split into Note that the first value of the string is ommitted (not important value). Here is my test code Output: Not exactly what I had in mind. Any suggestions about what I'm doing wrong here ? Thnx a lot LuCa UPDATE: thnx!! Result: @r = map { s/"//g; $_ }, $inp =~ /("[^"]*"|\S+)/g ;
Back to
Seekers of Perl Wisdom
|
|