|
Posted by Joe Smith on May 24, 2008, 2:44 am
Please log in for more thread options
Owen wrote:
> Just wondering if [:print:], with a pretest for a space would meet all
> the requirements of a unix password. (mixed case, numbers, and
> symbols)
>
> Or is there some easier way of doing it?
I'd say it is more straightforward to make such tests one at a time.
my $good = 0;
++$good if /[a-z]/;
++$good if /[A-Z]/;
++$good if /[0-9]/;
++$good if /\W/;
redo unless $good >= 3;
-Joe
Doctor Who?
|