in reply to Re: calling a sub from an if statement
in thread calling a sub from an if statement
Ahh.. the problem is that your hash isn't defined yet when you call msg in the if statement, but it is defined when you call it later on in the program. %msgs has to be defined before any calls to msg()