# Extract fields my @fields = /((?:[^#@]+|#.)*)/sg; # Remove seperators my $ff = 0; @fields = grep $ff^=1, @fields; # Unescape s/#(.)/$1/sg for @fields;
or use Text::CSV
Updated to remove empty elements were being placed in @fields.
In reply to Re: Splitting on escapable delimiter
by ikegami
in thread Splitting on escapable delimiter
by Daryn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |