Derek B. Smith wrote:
>
> --- Rob Dixon <[EMAIL PROTECTED]> wrote:
>>
>> Rob Dixon wrote:
>>>
>>> This will do what you want. It shuffles all of the possible characters
>>> and joins them into a string, and then finds the first substring of six
>>> characters that starts with a non-numeric character. The only proviso is
>>> that a password can never have the same character twice, which isn't true
>>> of the general solution.
>>>
[snip faulty code]
>>
>>    use List::Util qw/shuffle/;
>>
>>    my $chars = join '', shuffle (0..9, 'a'..'z', 'A'..'Z');
>>    my ($password) = $chars =~ /(\D.....)/;
>
> so this solution DOES NOT allow two of the same characters twice?
>
> cool thanks!
> derek


Yes. And it doesn't allow even one of the same character twice either! :)

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to