in reply to Re: split on delimiter unless escaped
in thread split on delimiter unless escaped
As you've demonstrated, it fails to split
bacon!!;eggs
Fix
while (<>) { chomp; s/\x{00}/\x{00}0/g; s/!!/\x{00}1/g; s/!;/\x{00}2/g; my @a = split /;/; for (@a) { s/\x{00}2/;/g; s/\x{00}1/!/g; s/\x{00}0/\x{00}/g; } ... }
I also fixed the inability to have char 00 in the data.
|
|---|