http://qs1969.pair.com?node_id=782136


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