in reply to dir match, dir may or may not appear
What syntax error and where? Perl is usually quite informative with its error messages.
Most likely, it's a syntax error in your regular expression. See perlre, especially about quantifiers.
Personally, I would reformulate the problem as "any directory that starts with /usr/ and ends with /bin, and do the checking in two regular expressions instead.
In Section
Seekers of Perl Wisdom