Help for this page

Select Code to Download


  1. or download this
    my $submitted_pw = $_;
    my $pw;
    ...
    } 
    # If $pw wasn't set in the loop, create a new password
    $pw ||= join(@chars[map{rand @chars} (1..17)];
    
  2. or download this
    my $submitted_pw = $_;
    my $pw = grep($submitted_pw eq $_, @stored) ? $submitted_pw : join(@ch
    +ars[map{rand @chars} (1..17)];
    
  3. or download this
    my %lookup_pwds;
    $lookup_pwds{$_}++ for (@stored};
    do {
        $pw = join(@chars[map{rand @chars} (1..17)];
    } while ($lookup_pwds{$pw});