if (exists $ENV{HTTP_USER_AGENT} and $ENV{HTTP_USER_AGENT} =~ /MSIE/) { # handle MSIE case } else { # handle "other" case (could be Netscape, Firefox, Konqueror, Opera, Nautilus, ...) }