I don't get what you are asking. Do you get an error message when running the code? If so it may be wise to include it. Did you try running with the -d and -w flags?
And use some dies in the code for example
open(USER, "user.txt") || die "error opening: $!";
Imagination is more important then knowledge -Einstein-