in reply to How to make a array of hashes and search them

You can do this in the shell:
grep -F -f file1 file2 file3 file4 file5
Although this assumes that an ID will not match a value.

Untested Perl solution:

my %matches = map {/(.*)/, 1}, do {local @ARGV = "file1"; <>}; local @ARGV = ("file2", "file3", "file4", "file5"); while (<>) { /^(\S+)/ && $matches{$1} && print }