if ($target !~ /..../) { print "Syntax Error: Target should be x or y or z\n"; pod2usage(-verbose => 1); # just the usage exit; }