Perl: the Markov chain saw | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
A very very simple answer to your question. Please don't laugh.
If you have 5 sons, would you like to refer each one of them with name or with indices ? You must have understood that internally hashes are just like arrays- somehow named arrays - whose values are referenced using keys. Arrays are better when a similar type of operation is performed on entire list. Hashes are better when you would like to use individual members of a group, which are always better to refer via a name which you can easily remember during coding and not via an index. Just my 2 cents on that. In reply to Re: why use a hash instead of an array
by gurpreetsingh13
|
|