in reply to Matching condition for two files

\a is the escape-sequence for alarm. You probably want to use \w instead (see perlre).