You should uncomment print Dumper %seen; and write \%seen instead of %seen: you are probably not getting what you expect in your %seen hash.
You may need to use captures in your regex (it depends on weither you want to use the whole name or just the number) in which case you'll find everything you need in Extracting matches (hint: it may be next unless $acc =~ /(^\d+)/; my $key = $1;/). Once your keys are what you expect them to be, in the filename loop you just have to check exists $seen{$key} to know if there is a match. See exists
In reply to Re: Compare two arrays
by Eily
in thread Compare two arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |