Yeeech. I guess when all you have in your toolbox is a hammer, everything gets a little banged up, regardless.split /(\".*?\"(?=,))|(.*?(?=,))|(.*?(?=\n))/
Had you considered using @result = /pattern/g instead of split? What I've found is that in general, if it's easier to talk about what you're keeping than what you're throwing away, the match wins over the split.
In reply to Re: Perl is returning... odd results... from regular expressions. Things matching when they shouldn't, and stuff like that.
by merlyn
in thread Perl is returning... odd results... from regular expressions. Things matching when they shouldn't, and stuff like that.
by Groxx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |