use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Internet Controls'; my $app; my $count = 0; while(defined ($app = Win32::OLE->GetActiveObject('InternetExplorer.Application'))){ $count++; $app->{'Visible'} = 1; my $result = $app->{'LocationURL'}; print $result . "\n"; $app->Quit; undef $app; sleep 1; } print "Total windows: $count\n"; # $app->{'TheaterMode'} = 1; # $app->{'FullScreen'} = 1; # $app->Quit;