<html>
<body>
Spot on! they used to be called associative arrays.<br>
A hash is an array of key and value pairs. The values must be scalars
however they may be references to arrays or to hashes. (references are
scalars).<br><br>
They have a few qwerks; like you can't predict what order they will
return values in like and array so you often need to sort on the keys a
(or values) as you retrieve them. Keys must be unique. And they screw
with your mind when you create hashes of arrays of hashes etc
:-)<br><br>
But they are powerful and you can build a whole database in one hash. You
can even bind it a file for permanence with various modules.<br><br>
<br>
At 2003/06/05 12:24 PM, Theunis De Klerk wrote:<br>
<blockquote type=cite class=cite cite>Hi Everyone,<br><br>
I'm a newbie, especially to Perl.So could someone please explain
what<br>
hashes are and what they are used for. From what i see they are sort
of<br>
like multi demensional arrays . Is that right?</blockquote>
<x-sigsep><p></x-sigsep>
<tt><br>
<font face="Courier New, Courier" size=2>Spike Hodge<br><br>
UNIX Programmer<br>
</font></tt><font face="Courier New, Courier" size=2>M-Web
Technology<br>
</font><tt>021 596 8496<br>
082 901 5265<br><br>
</tt>Click here and make M-Web your homepage<br>
<a href="http://homepage.mweb.co.za/" eudora="autourl">http://homepage.mweb.co.za</a></body>
</html>