in reply to If/else problems

Some questions:

1. Is that $timediff variable actually set to anything anywhere?
2. Have you checked the value in $month, $mon? Try printing it
3. Try adding 'use warnings;' to the top of your script, which will probably tell you something useful.
4. Look in the server logs to see what the error was, or run the script on the command line.

My guess would be that the $month variable is still unset (cset to undef) when you reach the if line, which is why it is complaining..

C.