in reply to Regexp question

If you don't want any characters inside $path to be interpreted as regex metachars.. then why don't you use the index function instead of a regex?