Be aware that the dot, ".", is a regular expression metacharacter meaning match any character (with a caveat, have a look at perlre). If you want to match the literal ".output" but not, say, "toutput" then you need to escape the dot with a backslash.