my %info; open(DB, "db.txt") || die "Could not open the database: $!"; while () { my @info=split /[\s|,]+/,$_; my $scott=shift @info; while (my $key=shift @info) { $info{$scott}{$key}=shift @info; } } close DB;