It's a hash.

You can use it in the following way.


-- code --
%daysPerMonth = ('Jan' => 31, 'Feb' => 28, 'Mar' => 31);

print "March has $daysPerMonth{'Mar'} days in it\n";

-- end code --

It allows you to look up a value using a key. In this instance, the value is
31, and the key is Mar.

Take a look at this URL for some more details.

http://www.netcat.co.uk/rob/perl/win32perltut.html#124-AssociativeArrays

HTH

John

-----Original Message-----
From: Naveen Parmar [mailto:[EMAIL PROTECTED]]
Sent: 24 January 2002 16:47
To: [EMAIL PROTECTED]
Subject: %


Hello,

What does % represent in the following statement?
%daysPerMonth = ('Jan' => 31, 'Feb' => 28, 'Mar' => 31);

Is %daysPerMonth an array? Do we really need an array for this?

TIA,
- NP

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  • % Naveen Parmar
    • Re: % Steve Maroney
    • RE: % Jamie Esliger
    • RE: % Hanson, Robert
    • John Edwards

Reply via email to