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

Replies are listed 'Best First'.
Re^2: Parsing a Hash
by northwestdev (Acolyte) on Jul 22, 2009 at 04:31 UTC
    Look under Synopsis: http://search.cpan.org/~cthom/Net-Twitter-2.12/lib/Net/Twitter.pm You missed the post where I said: I get a blank page (except when I dump the hash, which I posted in another message on this thread, and that's the real dump of the hash, with no warnings).