foreach my $plf (@plf_files) { chomp($plf); open my $match, '<',"$start_dir\\$plf" or die "could not open '$plf' $!"; my @file_lines = <$match>; $Hash_filenames{$plf}=\@file_lines; }