Submitted By: Brian Bernard

Perl script that launches Internet Explorer, open to the Web page specified in the variable $URL.

Visual Basic
# A simple Perl script to launch IE with the page specified in $URL.

use Win32::OLE qw(EVENTS);
my $URL = "";
my $IE  = Win32::OLE->new("InternetExplorer.Application")
    || die "Could not start Internet Explorer.Application\n";

$IE->{visible} = 1;


sub Event {
    my ($Obj,$Event,@Args) = @_;
    print "Here is the Event: $Event\n";
    if ($Event eq "DocumentComplete") {
        $IEObject = shift @Args;
        print "Here is my reference: $IEObject\n";
        print "URL: " .  $IEObject->Document->URL . "\n";