quotemeta (the \Q in the regex) makes sure that perl tries to find the string exactly as it is in $filename. If you don't use it, it will "translate" any meta character into its regex meaning. In your case, it probably does the same though.
In reply to Re^5: Compare two arrays
by Eily
in thread Compare two arrays
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |