Perl.com had an article on using Win32::OLE. It covers getting the DOM tree which I would think you can turn back into HTML. However if you're worried about the exact source fed to the brower, you are probably be out of luck. I think IE mangles it.
Comment on Re: Using Win32::GuiTest with Explorer_Server