my %files = ( 'him@here.com' =>[ 'test1.txt', 'test2.txt', 'test3.txt'], 'her@there.com' => [ 'test3.txt' ], 'it@where.com' => [ 'test2.txt', 'test1.txt' ] ); or generically: my %files2; foreach( ) { chomp; my ($email, @list ) = split( ',', $_ ); #assumes no commas in data file! $files2( $email ) = \@list; } and access looks like: my @list_of_files = @{ $files2{ $email } };