Hi, I'm still fairly new to Perl but as my first project I have been working on a chat script written in Perl. So far everything has gone well but I've run across a small problem. I'm confused as to how to do this. I've designed it to log public messages automatically, but there is a setting in config.cgi where the admin can specify if they want private messages to be logged or not.

Ok, the problem is I'm not sure how to code this right. There is a variable in config.cgi called $pm_log and they can set the value as 0 for no private messages to be logged or set it to the value of 1 to log private messages. I dont think the following code is to give them a choice, I think it just says to log them automatically. So, how do i write this to say IF the admin specifies $pm_log to be true...then log pm, otherwise only log public messages.

I know I'm right there at it...how do I specify IF $pm_log is true or $pm_type eq private THEN log, else do not. Can someone please help soon? I can't move on with the script until I get help. Thank you! --Allen