in reply to Check If 2 Arrays Match

Another possible solution?
#!/usr/bin/perl use strict; my @ids = 0..5; my @files = 3..8; my %record; $record{$_}++ for (@ids, @files); print map { "Same file and id: $_\n" if $record{$_} > 1 } %record;