this is the sort of thing that a debugger is designed to help with. if you haven't used the perl debugger before, it's never too soon to aquaint yourself with '-d'. (see 'perldoc perldebug'). set a breakpoint at the beginning of the function and step through, checking the value of $var as you go to find out where you lost it. it's almost guaranteed to be a faster way than waiting for us to pick apart your code for you. even if it doesn't help you, it will probably point you towards a much more specific question to ask.
In reply to Re: Crazyness
by thraxil
in thread Crazyness
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |