if ($input =~ /[<>@#\$%^&*()_+=|\{\}\[\]\/\\]/) { print "not okay"; } else { print "okay"; }