Next | Making Programs Faster | 88 |
Hashes are commonly used for objects
Keys are member data names, values are member data
if ($self->{TYPE} eq 'octopus') { $self->{tentacles} = 8; $self->{hearts} = 3; $self->{favorite_food} = 'crab cakes'; }
But arrays are smaller and faster
continued...
Next | Copyright © 2003 M. J. Dominus |