Why would it only work using "quotemeta"? I even removed the... for my $filename (@file) { #next unless $filename =~ /^\d+/; #if(grep { $seen{$_} =~ $filename} keys %seen) { # Failed #if(grep { $filename =~ $seen{$_} } keys %seen) { # Failed if(grep { $filename =~ /\Q$_/ } keys %seen) { print " YES - $filename\n"; } else { print " NO - $filename\n"; } }
In reply to Re^4: Compare two arrays
by Anonymous Monk
in thread Compare two arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |