in reply to HTML INCLUDES

Well, Perhaps something like:
while (<FILE>){ if (/your regex to match includes/){ #do something with it } }
This will read it line by line, you could push matches into an array or whatever you need to do to use the pathnames.

Unless I completely misunderstand you that may do the trick.