$password =~ m/^[DesiredCharactersHere]+$/Watch out! That permits "Desired\n"! I just zapped someone on the beginners list for that same mistake. Potential Big Security Hole.
Better to use something like: $password !~ /[^DesiredCharactersHere]/ or even not $password =~ tr/DesiredCharactersHere//c.
-- Randal L. Schwartz, Perl hacker
In reply to security hole, danger - Re: Re: Yet another REGEXP Question
by merlyn
in thread Yet another REGEXP Question
by fastkeys
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |