northwestdev has asked for the wisdom of the Perl Monks concerning the following question:
Disclaimer: Perl newbie here. I am trying to parse a Twitter response, using the Net::Twitter module. Given that the foreach loop code was taken from the Net::Twitter docs, I expected to see output, instead, I get nothing. Code:
my $nt = Net::Twitter->new( traits => [qw/API::REST/], username => $usename, password => $pwd ); my $results = $nt->show_user($twitterID); foreach my $user (@{ $results }) { my $id = $user->{id}; my $name = $user->{name}; print STDOUT $id." ".$name."<br>"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Parsing a Hash
by Old_Gray_Bear (Bishop) on Jul 21, 2009 at 21:32 UTC | |
by northwestdev (Acolyte) on Jul 21, 2009 at 21:50 UTC | |
Re: Parsing a Hash
by johngg (Canon) on Jul 21, 2009 at 21:25 UTC | |
by northwestdev (Acolyte) on Jul 21, 2009 at 21:39 UTC | |
Re: Parsing a Hash
by GrandFather (Saint) on Jul 22, 2009 at 01:02 UTC | |
by northwestdev (Acolyte) on Jul 22, 2009 at 04:31 UTC | |
Re: Parsing a Hash
by davorg (Chancellor) on Jul 21, 2009 at 22:19 UTC | |
by northwestdev (Acolyte) on Jul 21, 2009 at 22:33 UTC | |
by davorg (Chancellor) on Jul 22, 2009 at 08:05 UTC | |
by northwestdev (Acolyte) on Jul 22, 2009 at 12:04 UTC | |
by davorg (Chancellor) on Jul 22, 2009 at 12:08 UTC |
Back to
Seekers of Perl Wisdom