Keep in mind that the extension isn't a guarantee that the site is running NT, ASP, straight HTML, JSP or your favorite other technology; it's very easy to tell Apache, for example, that all files ending with ".asp" should be parsed as PHP files.
Not only that, but using a module like HTML::Mason preparses HTML files. I believe this is the recommended functionality.