use strict; use Win32::OLE; { my $browser; sub browser { unless ($browser) { $browser = Win32::OLE->CreateObject("InternetExplorer.Application"); $browser->{'Visible'} = 1; $browser->Navigate('about:blank'); }; $browser; }; }; sub handoff { my ($uri,$html) = @_; my $document = browser->{Document}; $document->open("text/html","replace"); # If there is no tag, set one. $html =~ s!()!$1!i unless ($html =~ /write($html); }; my $html = <
HTML handoff("http://www.google.de/",$html);