> Do I just have to put brackets within while(1)?
I don't think you need to. Loops are supposed to reinitialize the scope each time. However, you could try it to see if it fixes your problem.
CPAN::Forum
threads-shared - Re: pls a little help, kind of howto..