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 :
$SAN{$MyKey}++ where $Mykey is san or Parker:san.  To see what you have:

foreach my $MySortKey (sort keys %SAN) {
        print $MySortKey . "\n";
 }

Wags ;)
> Then I'd probably stick all of the keys into an array.
> However, using a hash I wouldn't have to use a foreach
> loop or an unless, would I?  That would make the
> Parker:san format and then dumping the keys into an
> array worth it.
> 
> As for lowercasing or uppercasing all the incoming
> names, they are all in the same format, capital
> letter, lower case letters.  I think what you were
> implying with using the hash is that if the incoming
> name matches one of the keys, it will overwrite that
> key.  Since the names are in the same format, then
> there's no need to uppercase or lowercase them, right?
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Search - Find what you're looking for faster
> http://search.yahoo.com



      Any questions and/or problems, please let me know.

      Thanks.

Wags ;)
Int: 9-8-002-2224
Ext: 408-323-4225x2224



**********************************************************
This message contains information that is confidential
and proprietary to FedEx Freight or its affiliates.
It is intended only for the recipient named and for
the express purpose(s) described therein.
Any other use is prohibited.
****************************************************************


--
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