#!/usr/bin/perl -w use strict; my $var = "yes"; if ($var eq ("yes" or "no")) { print "You choose $var\n"; }else{ print "you chose something other then yes or no\n" }