
stevend1980
Novice
Jan 31, 2012, 11:26 AM
Post #3 of 6
(848 views)
|
|
Re: [stevend1980] Access HASH returned from modules function (IE::Automation)
[In reply to]
|
Can't Post
|
|
Here I've nested the while loop to read the hash's. Garbage and more hash refs? Am I doing something wrong or is this module broken?
use strict; use warnings; use Win32::IEAutomation; my $ie2 = Win32::IEAutomation->new( visible => 1, warnings => 1); $ie2->gotoURL('http://www.google.co.uk'); my @ref = $ie2->getAllLinks(); foreach (@ref) { while ((my $key, my $value) = each(%{$_})){ while ((my $key2, my $value2) = each(%{$value})){ print $key2.", ".$value2."\n"; } } } agent, Win32::OLE=HASH(0x32100c) className, id, tagName, A parentElement, Win32::OLE=HASH(0x28bb4cc) onhelp, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onclick, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. ondblclick, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onkeydown, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onkeyup, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onkeypress, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onmouseout, onmouseover, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onmousemove, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onmousedown, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. onmouseup, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. document, Win32::OLE=HASH(0x28bb58c) title, language, onselectstart, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. sourceIndex, 14 recordNumber, Use of uninitialized value $value2 in concatenation (.) or string at C:/Users/Steve/eclipse/ieAuto/example.pl line 13. lang, offsetLeft, -13333 offsetTop, 0 offsetWidth, 331 offsetHeight, 16 offsetParent, Win32::OLE=HASH(0x28bb63c) innerHTML, Screen-reader users, click here to turn off Google Instant. innerText, Screen-reader users, click here to turn off Google Instant. outerHTML, <A style="POSITION: absolute; LEFT: -1000em" href="/setprefs?prev=http://www.google.co.uk/&sig=0_yCgQm2uM5F4_34n3OOn7YfUT4h4%3D&suggon=2">Screen-reader users, click here to turn off Google Instant.</A> outerText, Screen-reader users, click here to turn off Google Instant. parentTextEdit, Win32::OLE=HASH(0x28bb68c) isTextEdit, 0 filters, Win32::OLE=HASH(0x28bb60c) Maybe that explains why data dumper ran out of memory
|