--- "Wagner, David --- Senior Programmer Analyst ---
WGO" <[EMAIL PROTECTED]> wrote:
> Stuart White wrote:
> >>> In the end, I want @SAN to have all the unique
> names
> >>> within the file.  Any ideas?
> >>    You just described a Hash. Use %hash and then
> >> either uppercase or lowercase the the incoming
> key.
> >> YOu could then add a count to the Hash so you
> know
> >> you are looking at all things or not. The keys
> for a
> >> hash can only appear once(ie, San and SAn are two
> >> different keys) that is why you should uppper or
> >> lower the keys.
> >> 
> >> Wags ;)
> > 
> > 
> > If I had a hash, I'd have to have a key and a
> value
> > though.  I'm just looking for one or the other.  I
> > suppose I could have key value pairs in the %SAN
> hash
> > like so:
> > 
> > Parker:san
> > Bowen:san
> > etc
>       I guess I don't quite understand what you are
> trying to do.  From your desc, all you stated is you
> wanted to know how many unique items you have.  SO 
> parker:san, bowen:san, is san only once in the hash.
> Or are you combining the data as in Parker:san is
> the key.  You only need pairs if you are trying to
> reload a hash.  SO, you can pull san and check as in
> :

Perhaps I have keys and values backwards.  Parker and
Bowen would be from the file, and they'd be the keys. 
I added the san as the value because the way I
understand a hash is that it's a pair.  If Parker is
read in, it would need something to pair with, I just
chose san semi-arbitrarily.  It could have just as
well been foobar, or valuePlaceHolder.  The important
thing is the hash name, %SAN, and the names to read
in, ie, Parker, Bowen etc.  san, as the value, is not
important, it's just what I thought I'd need to
complete the pair.




__________________________________
Do you Yahoo!?
Yahoo! Search - Find what you’re looking for faster
http://search.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to