...Beauty, cleaning, DIY tips and more - free to join!
   Login   Contact us   Site map   Puzzle Club   Ask a question    Newsletter

How To Understand A Hash

Computing : Learning Perl

If you haven't worked with Perl before, you may be unsure as to exactly what a hash is.

Well, a hash is simply an unordered collection of values, each of which is identified through a key, which is unique.

Therefore you can think of a hash as a lucky dip - there are lots of items stored in the barrel of sawdust, and each one has a unique tag attached.

So, you may have the word "keyring" in the barrel twice (value) but each will have a unique identifier attached, perhaps "plastic" and "metal".

You don't know the order, but you do know that they relationship between a key and the value will always be the same.


By: Stephen

Share on Facebook: On Twitter: TwitterTweet this!

  Reply to How To Understand A Hash

  Receive Our Newsletter




Questions about Learn Perl:

Ask question

More Articles:
Your mailing list: the key decision
How to shut down Windows quickly
How to add spell check to firefox