#!/usr/bin/perl -w use strict; my %data; open DB, "db.txt"; while () { @_ = split/[\t,|\n]/; $data{ $_[0] } = { @_[1..$#_] }; } close DB;