in reply to write to textfile

There are a number of things here that you probably don't mean to be doing, but for starters:

If you need more help, then you should supply more context such as what exactly does happen (with the benefit of using $! as ar0n suggested), and what is in all the global variables that this subroutine is using.

--
I'd like to be able to assign to an luser