in reply to random passgen

You've only got 18 consonants (you're missing q), but you're generating random indexes between 0 and 19 (inclusive). On the other side, you've got 6 vowels, but you're only generating indexes between 0 and 4 (inclusive).

Add in q, and change your code to rand 19 and rand 6.

Update: bent makes a great point; instead of hard-coding the numbers in the calls to rand, use the size of the array: rand @chars and rand @vowels.