in reply to Compare two arrays
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Compare two arrays
by Anonymous Monk on Oct 01, 2014 at 17:14 UTC | |
by Eily (Monsignor) on Oct 01, 2014 at 17:25 UTC | |
by Anonymous Monk on Oct 01, 2014 at 17:57 UTC | |
by Eily (Monsignor) on Oct 01, 2014 at 22:26 UTC |