On Wed, Sep 01, 1999 at 03:55:39PM -0400, Charles Heffner wrote:
> For clarification,
> What exactly is a key? For this filter:
> <filter name=selectkeys keys=X invert> I understand the
> variable X and invert, but not exactly what a key is.
> Also, what is the difference between a hash and an array? I
> understand string, and an array is a series of related
> strings; but a hash (besides something you eat)?
Hashes are also sometimes called "associative arrays" - so they are
kind of like arrays. Except that the data that's stored in a
`regular' array is referenced by a number whereas the data stored in
a hash is referenced by an arbitrary string (the key).
E.g if you have an array @ARRAY ("@" is Perl way to say `this is an
array') you could ask what is the third member of @ARRAY or you could
put a string in the first position of @ARRAY. On the other hand, if
you have a hash %HASH ("%" again is the Perl way to say `this is a
hash') you would ask what data is associated with the key
"AnyString". The keys of a hash have no particular order.
So what does the selectkeys handler do? Simple! You have a hash with
lots of different data associated with different keys and you need
only the small part of that data that's associated with a few select
keys.
Most of the time you would probable use selectkeys together with the
map handler.
HTH,
Jan
--
Jan Peter Hecking - University of Rostock - Dept. of Computer Science
eMail: [EMAIL PROTECTED] (icq #14643959) /\/\
public key: http://www.informatik.uni-rostock.de/~jhecking/pgp \--/
fingerprint: 18 91 55 54 62 67 CC 71 05 5F C7 AE E4 F3 B7 D9 \/
-
If you would like to unsubscribe from this mailing list send an email to
[EMAIL PROTECTED] with the body "unsubscribe newsclipperlist
YOUR_EMAIL_ADDRESS" (without the quotes) or use the form provided at
http://www.NewsClipper.com/TechSup.htm#MailingList.