Derek B. Smith wrote: > >>Why not just specify a non-digit for the first >>character: >> >>my @a = ( 0 .. 9, 'a' .. 'z', 'A' .. 'Z'); >> >>my $password = join '', $a[ 10 + rand( @a - 10 ) ], >>map $a[ rand @a ], 1 .. 5; > > Ok great, but I do not fully understand this. Will you > explain in English?
The first ten elements of @a are the digits 0-9 so the first list item picks a random element that ignores the first ten elements of @a and the next five list items pick a random element from the entire array. John -- Perl isn't a toolbox, but a small machine shop where you can special-order certain sorts of tools at low cost and in short order. -- Larry Wall -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>