in reply to Parsing a Hash
I see no such example code and the Data::Dumper output you show elsewhere is inconsistent with the loop. The dump shows a hash where the loop expects an array.
Furthermore your assertion that "I expected to see output, instead, I get nothing" is inconsistent with the combination of dump and the for loop syntax. The for loop is expecting an array reference and is getting a hash reference - is should complain "Not an ARRAY reference at ...".
The following probably gets the data you want (untried):
my $results = $nt->show_user($twitterID); my $id = $results->{id}; my $name = $results->{name}; print STDOUT $id." ".$name."<br>";
True laziness is hard work
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Parsing a Hash
by northwestdev (Acolyte) on Jul 22, 2009 at 04:31 UTC |
In Section
Seekers of Perl Wisdom