in reply to How to Map Regex to Hash

Split doesn't work here - the edge cases don't process properly. japhy had the correct answer:
use strict; use warnings; use Data::Dumper; chomp($_ = <DATA>); my %rec; $rec{$1} = $2 while m/(\d+),"(.*?)"/g; print Dumper(\%rec); __DATA__ 0,"104"1,"Assign Tracking Numb"29,"905745371116"526,"0201"99,""

Replies are listed 'Best First'.
Re^2: How to Map Regex to Hash
by CountZero (Bishop) on Jul 01, 2006 at 08:10 UTC
    What edge case where you thinking of?

    CountZero

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