#!usr/bin/perl use strict; use warnings; my $security = "xxx"; my $username = "xxx"; my $type = "Check In"; if ($username eq "$security" and $type ne "Check In" and $type ne "Check Out" ) { print "if executed, username=$username type=$type\n"; } else { print "if not executed, username=$username type=$type\n"; } __END__ if not executed, username=xxx type=Check In *** This is the same thing:*** if (($username eq "$security") and !( $type eq "Check In" or $type eq "Check Out") )