in reply to 'my' problems

Don't use a statement modifier on a my declaration. It tickles a bug in perl which causes the my variable not to re-initialised at the next entry to the block.

Dave.