in reply to Advice in deciding hash or array

update: of course, as runrig points out, this all depends what you have planned for this data. there is more than one way to do it.

That looks like a hash of lists, as in:
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( <LINE> ) { chomp; my ($email, @list ) = split( ',', $_ ); #assumes no commas in data f +ile! $files2( $email ) = \@list; } and access looks like: my @list_of_files = @{ $files2{ $email } };