my @stuff; while () { chomp; my %record = map {split /\s*=\s*/} split /,\s*/; push @stuff, \%record; }