<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: [Za-pm] Hashes</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>Robert Pepper's tutorial's url is as follows:</FONT>
<BR> <FONT SIZE=2><A HREF="http://www.netcat.co.uk/rob/perl/win32perltut.html" TARGET="_blank">http://www.netcat.co.uk/rob/perl/win32perltut.html</A> </FONT>
</P>
<P><FONT SIZE=2>Regards,</FONT>
</P>
<P><FONT SIZE=2>Emmanuel</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Werner Moller [<A HREF="mailto:wernerm@ifusion.co.za">mailto:wernerm@ifusion.co.za</A>]</FONT>
<BR><FONT SIZE=2>Sent: 05 June 2003 12:35</FONT>
<BR><FONT SIZE=2>To: Theunis De Klerk; Za-pm@mail.pm.org</FONT>
<BR><FONT SIZE=2>Subject: RE: [Za-pm] Hashes</FONT>
</P>
<BR>
<P><FONT SIZE=2>Read this doument set up by Robert Pepper, you might find a newer version on</FONT>
<BR><FONT SIZE=2>the net. It was my "Newbie Bible" and contains everything you need to know</FONT>
<BR><FONT SIZE=2>before getting into the deep end. </FONT>
</P>
<P><FONT SIZE=2>Cheers,</FONT>
<BR><FONT SIZE=2>Werner</FONT>
</P>
<P><FONT SIZE=2>PS: Read with IE - web archive single file</FONT>
</P>
<P><FONT SIZE=2>-----Original Message-----</FONT>
<BR><FONT SIZE=2>From: Theunis De Klerk [<A HREF="mailto:theunis@ixpress.co.za">mailto:theunis@ixpress.co.za</A>]</FONT>
<BR><FONT SIZE=2>Sent: 05 June 2003 12:25</FONT>
<BR><FONT SIZE=2>To: Spike</FONT>
<BR><FONT SIZE=2>Cc: Za-pm@mail.pm.org</FONT>
<BR><FONT SIZE=2>Subject: Re: [Za-pm] Hashes</FONT>
</P>
<BR>
<P><FONT SIZE=2>Hi Everyone,</FONT>
</P>
<P><FONT SIZE=2>I'm a newbie, especially to Perl.So could someone please explain what</FONT>
<BR><FONT SIZE=2>hashes are and what they are used for. From what i see they are sort of</FONT>
<BR><FONT SIZE=2>like multi demensional arrays . Is that right?</FONT>
</P>
<P><FONT SIZE=2>Muchly appreciated!!!</FONT>
<BR><FONT SIZE=2>Theunis</FONT>
</P>
<BR>
<P><FONT SIZE=2>On Thu, 2003-06-05 at 09:32, Spike wrote:</FONT>
<BR><FONT SIZE=2>> At 2003/06/05 08:47 AM, Sean Carte wrote:</FONT>
<BR><FONT SIZE=2>> >Chapter 4 of the Camel is a good place to start, or end, or go back to</FONT>
<BR><FONT SIZE=2>> >repeatedly until it suddenly starts to make sense.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Oh yes! I know exactly what you mean. All the books seem to get too deep </FONT>
<BR><FONT SIZE=2>> into hashes too quick.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> My advice is to just start trying to put something in a hash and get it</FONT>
<BR><FONT SIZE=2>out </FONT>
<BR><FONT SIZE=2>> again - it will make sense eventual - I promise.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> In one of the reference books is says something like "There is no</FONT>
<BR><FONT SIZE=2>technical </FONT>
<BR><FONT SIZE=2>> limit to the number of dimensions in a hash array [hashes of hashes of </FONT>
<BR><FONT SIZE=2>> hashes ...] But most human programers stop at 3"</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Start simple:-</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> %hash = (</FONT>
<BR><FONT SIZE=2>> car => 1,</FONT>
<BR><FONT SIZE=2>> wife => 2,</FONT>
<BR><FONT SIZE=2>> dog => 4,</FONT>
<BR><FONT SIZE=2>> kids => 2</FONT>
<BR><FONT SIZE=2>> )</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> print "$hash{car}\n"; # 1 expected</FONT>
<BR><FONT SIZE=2>> print "$hash{wife}\n; # 2 expected</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> $hash{dog} = 6;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> print "$hash{dog}\n"; # 6 expected</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> $hash{dog} ++;</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> print "$hash{dog}\n"; # 7 expected</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> foreach $key (keys %hash)</FONT>
<BR><FONT SIZE=2>> {</FONT>
<BR><FONT SIZE=2>> print "The value for key $key is $hash{$key}\n";</FONT>
<BR><FONT SIZE=2>> }</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> # The value for key car is 1</FONT>
<BR><FONT SIZE=2>> # The value for key wife is 2</FONT>
<BR><FONT SIZE=2>> # etc. expected</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Remember that keys are unique so you can use a hash as a unique command.</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Spike Hodge</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> UNIX Programmer</FONT>
<BR><FONT SIZE=2>> M-Web Technology</FONT>
<BR><FONT SIZE=2>> 021 596 8496</FONT>
<BR><FONT SIZE=2>> 082 901 5265</FONT>
<BR><FONT SIZE=2>> </FONT>
<BR><FONT SIZE=2>> Click here and make M-Web your homepage</FONT>
<BR><FONT SIZE=2>> <A HREF="http://homepage.mweb.co.za" TARGET="_blank">http://homepage.mweb.co.za</A> </FONT>
</P>
<BR>
<P><FONT SIZE=2>_______________________________________________</FONT>
<BR><FONT SIZE=2>Za-pm mailing list</FONT>
<BR><FONT SIZE=2>Za-pm@mail.pm.org</FONT>
<BR><FONT SIZE=2><A HREF="http://mail.pm.org/mailman/listinfo/za-pm" TARGET="_blank">http://mail.pm.org/mailman/listinfo/za-pm</A></FONT>
</P>
<P><FONT SIZE=2>############################################################################</FONT>
<BR><FONT SIZE=2>#########</FONT>
<BR><FONT SIZE=2>This e-mail message has been scanned for Viruses and Content and cleared </FONT>
<BR><FONT SIZE=2>by Ifusion's MailMarshal Gateway</FONT>
<BR><FONT SIZE=2>############################################################################</FONT>
<BR><FONT SIZE=2>#########</FONT>
</P>
<BR>
<P><FONT SIZE=2>#####################################################################################</FONT>
<BR><FONT SIZE=2>Note:</FONT>
<BR><FONT SIZE=2>This message is for the named person's use only. It may contain confidential,</FONT>
<BR><FONT SIZE=2>proprietary or legally privileged information. No confidentiality or privilege</FONT>
<BR><FONT SIZE=2>is waived or lost by any mistransmission. If you receive this message in error,</FONT>
<BR><FONT SIZE=2>please immediately delete it and all copies of it from your system, destroy any</FONT>
<BR><FONT SIZE=2>hard copies of it and notify the sender. You must not, directly or indirectly,</FONT>
<BR><FONT SIZE=2>use, disclose, distribute, print, or copy any part of this message if you are not</FONT>
<BR><FONT SIZE=2>the intended recipient. IFusion (PTY) Ltd and any of its subsidiaries each reserve</FONT>
<BR><FONT SIZE=2>the right to monitor all e-mail communications through its networks.</FONT>
</P>
<P><FONT SIZE=2>Any views expressed in this message are those of the individual sender, except where</FONT>
<BR><FONT SIZE=2>the message states otherwise and the sender is authorized to state them to be the</FONT>
<BR><FONT SIZE=2>views of any such entity.</FONT>
</P>
<P><FONT SIZE=2>Thank You.</FONT>
<BR><FONT SIZE=2>#####################################################################################</FONT>
</P>
</BODY>
</HTML>