I'm not sure what you have in mind. This may be the kind of example you want, of a split into a hash. If so, you can then change the "for" loop to a "while(<FILEHANDLE>)".
my $txt=<<'TEXT_END';
nameone, addr1 info (without commas in it)
nametwo, address two, city (with a comma)
namethree, address three fields
TEXT_END
my %info;
my ($name,$addr);
for (split "\n",$txt) {
($name,$addr) = split ',',$_,2;
$info{$name} = $addr;
}
my ($key,$val);
while (($key,$val)= each(%info)) {
print "$key->$val\n";
}
Update: Added ",$_,2" to the split, to handle addresses with a comma, and modified test cases acordingly