I don't want to fix all the problems in my reply - I was hoping my pointers would lead you to find your own problems. Here are some more pointers to get you started.
Do not create a sub called stat - use uppercase or change the name because of the Perl built in stat
You include subs within subs, which is not what I believe you intended to do. You have the correct number of curly braces, just not where they should be - consistent indentation is the key.
Your sluggishness you mentioned I am betting only occurs after playing the game a while - that is because you never let a sub properly exit, you just keep calling subs within subs
I should have something for you to look at by tonight, but if not - /msg me (you do have a real account right?)
Limbic~Region