print "PRINTING MATCHED HASHES\n"; foreach my $key ( keys %Hash_filematches ) { delete $Hash_filematches{"$key"} if(!exists($Hash_filematches{"$key"})); my $value = $Hash_filematches{$key}; print "$key => $value\n" ; }