in reply to Re: split on unescaped delimiters
in thread split on unescaped delimiters
is the best I can do. And that's way too ugly.my $scratch = ''; my @a = (map(defined() ? ($scratch.=$_)[()] : substr($scratch,0,length($scratch),''), split /(\\.)|X/, $escaped_str), length($scratch) ? $scratch : ());
Maybe something based on @a = @{List::Util::reduce { ... } [], split... };
|
|---|