XP is just a number | |
PerlMonks |
Re: Accessing an array of structsby ferreira (Chaplain) |
on Apr 04, 2007 at 13:43 UTC ( [id://608277]=note: print w/replies, xml ) | Need Help?? |
What are those "structs"? Real C structs passed by some C binding or just hash refs? In the first case, the issue is more complicated and may involve unpack and a few tweaks until the right data is visible to Perl (not necessarily in a portable way). In the second change, replace $structs[0]->name with $structs[0]->{name} and you'll be fine.
In Section
Seekers of Perl Wisdom
|
|