in reply to How to Map Regex to Hash

I think split is a better fit.
%row = split /,"?|"/, $result;
seems to work. That's a comma followed by an optional doublequote, or just a doublequote.

Update: CountZero is right: there aren't any commas without a doublequote after them. So I guess it could be

%row = split /,?"/, $result;

Caution: Contents may have been coded under pressure.

Replies are listed 'Best First'.
Re^2: How to Map Regex to Hash
by CountZero (Bishop) on Jun 30, 2006 at 21:34 UTC
    %row = split /,"|"/, $result; seems to work as well.

    CountZero

    "If you have four groups working on a compiler, you'll get a 4-pass compiler." - Conway's Law