RE: Probably a simple hash question

2003-01-24 Thread Michael Hooten
> Here's the setup: > I have set up a hash %categories where the key is one number and the value > is another > i.e. $categories('1094') = 100049-0220-14 I assume you meant (note braces and quotes): $categories{1094} = '100049-0220-14' otherwise the value will be 100049-0220-14 = -

Re: Probably a simple hash question

2003-01-23 Thread R. Joseph Newton
"Lara J. Fabans" wrote: > Hi, perl-friends,... Hi Lara, You said: > I had a while loop to search through each of the keys & values, but the problem is > that it doesn't break out of the while loop, and the wrong value gets set as $myID; Look at your words, thenlook at your code: > #while(my (

RE: Probably a simple hash question

2003-01-23 Thread Dan Muey
> Morning, Dan Morning! > > At 11:50 AM 1/23/2003 -0600, you wrote: > > > i.e. $categories('1094') = 100049-0220-14 > > > > do you mean $catagories{'1094'} ? > > Yup, I did. Never type anything in from memory :-) I can't anyway because my memory doesn't work. > > > > > value is ther

Re: Probably a simple hash question

2003-01-23 Thread Rob Dixon
Lara J. Fabans wrote: > Hi, perl-friends, > > Here's the setup: > I have set up a hash %categories where the key is one number and the > value is another > i.e. $categories('1094') = 100049-0220-14 You need quotation marks here, like this: $categories('1094') = '100049-0220-14'; othe

RE: Probably a simple hash question

2003-01-23 Thread Dan Muey
> Hi, perl-friends, > > Here's the setup: > I have set up a hash %categories where the key is one number > and the value > is another > i.e. $categories('1094') = 100049-0220-14 do you mean $catagories{'1094'} ? > > So, further on down, I'm trying to do a lookup in %categories > to see i