in reply to How to use IF

Try to use the perl debugger to see what is going on at the time of the given if(). Also do a print "<br>es='$es'\n"; to see what the value of $es is that you're trying to match the regex against.