For those trying to generate all possible 4-letter words [as in all 456,976 of them], glob is your friend:
Result:#!/your/perl/here use warnings; use strict; use Data::Dumper; my $all_lowercase = '{' . join( ',', 'a'..'z') . '}'; my @x = glob "$all_lowercase" x 4; print "size of \@x = ", scalar @x, "\n"; print Dumper @x; __END__
size of @x = 456976 $VAR1 = 'aaaa'; $VAR2 = 'aaab'; $VAR3 = 'aaac'; $VAR4 = 'aaad'; $VAR5 = 'aaae'; [snip] $VAR456972 = 'zzzv'; $VAR456973 = 'zzzw'; $VAR456974 = 'zzzx'; $VAR456975 = 'zzzy'; $VAR456976 = 'zzzz';
-QM
--
Quantum Mechanics: The dreams stuff is made of
In reply to Re: creating all possible random 'words' from 4 letters
by QM
in thread creating all possible random 'words' from 4 letters
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |