#!/usr/bin/perl -w use strict; use warnings; use diagnostics; use Win32::OLE qw(in with EVENTS); my $URL = 'http://www.pageresource.com/html/frameex5.htm'; my $IEWin = ''; my $IEObject = undef; my $Class = 'InternetExplorer.Application'; $IEWin = Win32::OLE->new( $Class ) || die "Can not obtain a $Class object\n"; $IEWin->{visible} = 1; $IEWin->Navigate($URL); my $wait = 300; until ( $IEWin->{Busy} != 1 || $wait <= 0 ) { $wait--; sleep 1; } my $IEDoc = $IEWin->{Document}; my $frames = $IEDoc->{frames}; my %frameshash; for (my $i = 0; $i < $frames->{length}; $i++) { $frameshash{$frames->{$i}->{name}} = $frames->{$i}; } foreach my $key ( keys( %frameshash ) ) { print "\n".$key."\n"; print $frameshash{$key}->{document}->{body}->{innerHTML}."\n"; }