Perl-Sensitive Sunglasses | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Well, hashes aren't exactly the same thing. Arrays are ordered, and hashes aren't. Many people still wonder why keys() doesn't return the keys in the order they added them (or even the same order all the time), and it will always be something I have to emphasize in a beginning Perl class. I don't like to say that arrays are indexed by non-negative integers either (and I've always wondered why people use "integer" just to ignore half of them). We can use the negative indices to count from the end as long (as we have enough entries to count).
-- brian d foy <brian@stonehenge.com> In reply to Re^2: Use Hash? Array? Still confused after all these years.
by brian_d_foy
|
|