my %hrec; while (){ chomp; my ($name,$comment) = split ","; $name =~ s/"//g; $comment =~ s/"//g; $hrec{$name} = $comment; }