in reply to why use a hash instead of an array
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: why use a hash instead of an array
by DarrenSol (Acolyte) on Jun 13, 2013 at 15:10 UTC | |
by gurpreetsingh13 (Scribe) on Jun 14, 2013 at 04:35 UTC |