Thanks for pointing it out. I did mis-state my problem. I only want to match if $_ is an exact match for the alternate. I only want to match on 'directory', not 'directorys' or 'directoryy' or 'cheeze whiz'.
Use \b to assert a word boundary then.
my $word = qr/\b(directory|file|age|action)\b/;
Or ^ and $ to assert string start/end (respectively).
my $word = qr/^(directory|file|age|action)$/;
Or any combination of the two that you like. See perldoc perlre.