RE: Hashes with multiple values per key

2001-08-08 Thread Bob Showalter
> -Original Message- > From: Casey West [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 07, 2001 5:23 PM > To: Bob Showalter > Cc: '[EMAIL PROTECTED]' > Subject: Re: Hashes with multiple values per key > > ... > That's not very nice dude. I d

Re: Hashes with multiple values per key

2001-08-07 Thread Sophia Corwell
est > : > Cc: [EMAIL PROTECTED] > : > Subject: Re: Hashes with multiple values per key > : > > : > > : > Thanks for the reply eventhough my question was > not > : > clear. > : > > : > Let me explain what I am trying to do. > : > > : >

Re: Hashes with multiple values per key

2001-08-07 Thread Casey West
On Tue, Aug 07, 2001 at 05:42:55PM -0400, Bob Showalter wrote: : > -Original Message- : > From: Sophia Corwell [mailto:[EMAIL PROTECTED]] : > Sent: Tuesday, August 07, 2001 5:24 PM : > To: Casey West : > Cc: [EMAIL PROTECTED] : > Subject: Re: Hashes with multi

RE: Hashes with multiple values per key

2001-08-07 Thread Bob Showalter
> -Original Message- > From: Sophia Corwell [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, August 07, 2001 5:24 PM > To: Casey West > Cc: [EMAIL PROTECTED] > Subject: Re: Hashes with multiple values per key > > > Thanks for the reply eventhough my question w

Re: Hashes with multiple values per key

2001-08-07 Thread Sophia Corwell
Thanks for the reply eventhough my question was not clear. Let me explain what I am trying to do. I have a hash named %orgjobs whose keys have multiple values. The keys are department numbers and the values are job_titles. There is a also a text file that has a list of departments, users, and

RE: Hashes with multiple values per key

2001-08-07 Thread RArul
@{$hash{'jmj'}}; }; close(INP); timethis(100, $expressiveCode); timethis(100, $idiomaticCode); Please refer attachment for the stats(small file). -- Rex -Original Message- From: Luke Bakken [mailto:[EMAIL PROTECTED]] Sen

RE: Hashes with multiple values per key

2001-08-07 Thread Luke Bakken
> #Mode Idiomatic Way and is more efficient too! > map { print "Take working vacation bud\n"; } grep{$_ eq 'george'} > @{$hash{'jmj'}}; > > I would prefer the second way -- the idiomatic way of doing it in Perl. I > have read, somewhere that the second approach is more efficient. Actually discard

RE: Hashes with multiple values per key

2001-08-07 Thread RArul
ere that the second approach is more efficient. -- Rex -Original Message- From: Luke Bakken [ mailto:[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ] Sent: Tuesday, August 07, 2001 3:59 PM To: Sophia Corwell Cc: [EMAIL PROTECTED] Subject: Re: Hashes with multiple values per key > D

Re: Hashes with multiple values per key

2001-08-07 Thread Luke Bakken
> Does anyone have any ideas on what is a good way to > check the existance of a value for a key that has > multiple values? I'll assume that your hash table has the following structure: $hash{$key} = [ ]; that is, the value of each hash element is an array reference. Let's say you're looking

Re: Hashes with multiple values per key

2001-08-07 Thread Casey West
On Tue, Aug 07, 2001 at 12:14:55PM -0700, Sophia Corwell wrote: : Hello Perl Help, : : Does anyone have any ideas on what is a good way to : check the existance of a value for a key that has : multiple values? I'm not quite sure what you're asking for so I'm going to try and rephrase your questi

Hashes with multiple values per key

2001-08-07 Thread Sophia Corwell
Hello Perl Help, Does anyone have any ideas on what is a good way to check the existance of a value for a key that has multiple values? Thanks in advance, __ Do You Yahoo!? Make international calls for as low as $.04/minute with Yahoo! Messenger h