in reply to totally lost
Precedence. You're matching badinput against the negation of $input. Use:
instead.if ($input !~ /badinput/) { ... }
Or
but that's more typing, and less idiomatic.if (!($input =~ /badinput/)) { ... }
|
---|
In Section
Seekers of Perl Wisdom