If the page you want to grab is constructed using JavaScript write() (this trick is widely-known as client-side includes), then you are unlikely to succeed. The browsers just run this scriptlets while rendering the page. You won't see the result even if you "Save As" the page. And I don't know of any JavaScript engines available to Perl programs :(