I'm trying to get random lower case/upper case in my 42 chars password. Somehow I instead get:
ucclcjuczlclucmlc0lcdlc5lc0ucdlccucmucquc5ucslc4lckucxuctlcvlcquclucpuc0ucvlczucducauczlcauc7lciucmlcplcjucolchucmucpuc9lcilcqlck
Here is my code:
@a = (0 .. 9, 'a' .. 'z');
@case = ('lc','uc');
my $x = join '', map { scalar $case[rand(0-2)], $a[int rand @a]} 0 .. 42;
print "$x\n";
Any Hints?
Why not just select a random alphanumeric character (that, in the case of letters, can be upper or lower case)?
If you want to make
lcorucan explicit part of the process, you can do something like: