"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 ($key, $value) = each %categories )

Since you know that one of your stopping ocnditions is to have the value == $ccid, AND 
you also know that prudence demands that you check to make sure that your hash line 
returns a value before you try to use that value, the and operator is called for:
while(my ($key, $value) = each %categories  and !($value == $ccid)) {

Joseph


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to