http://www.perlmonks.org?node_id=1210531


in reply to Twitter API - Not a hash reference

Hello,

Just seeing docs (never twitted inmy life..) I assume $nt->lookup_users.. returns an array so you need to iterate over element or access directly one as in:

# totally untested! my @users = $nt->lookup_users; foreach my $usr (@users){ print $usr{screen_name}; #?? use Data:Dump dd method to see the structure you get back (better t +han Data::Dumper) dd $usr } # or directly first element returned print $users[0]{screen_name}; dd $users[0];

I just looked here and here

UPDATE sorry the method does not returns an array but an array ref: not big difference but different..

# totally untested! again my $users = $nt->lookup_users; foreach my $usr (@$users){ print $usr{screen_name}; #?? use Data:Dump dd method to see the structure you get back (better t +han Data::Dumper) dd $usr } # or directly first element returned print $$users[0]->{screen_name}; dd $$users[0];

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.