XP is just a number | |
PerlMonks |
Re: split function for | and \| delimiterby moritz (Cardinal) |
on May 25, 2012 at 18:39 UTC ( [id://972515]=note: print w/replies, xml ) | Need Help?? |
The most robust solution is probably to use Text::CSV, which can handle delimiters and escaped delimiters. If you want to do it with a regex, you must split on a vertical bar that is not preceeded by a backslash. Since both the vertical bar and the backslash are meta characters in regexes, you need to backslash-escape both:
See perlretut for more details.
In Section
Seekers of Perl Wisdom
|
|