while(<$INPUT>){ chomp($_); my @arr = split('\t',$_); {"$arr[0]_"."$arr[1]"} = "$arr[0]\t$arr[1]\t$arr[2]\t$arr[3]"; ## hash for keeping the files } close($INPUT); for(my $i = 1; $i <= 40; $i++){ open my $IN, "File".$i or die $!; ## Fasta File while(<$IN>){ ## Reading the files and extracting ## but I am not able to use the hash table ##properly } close($IN); } close($OUTPUT);