in reply to creating all possible random 'words' from 4 letters

Anonymous Monk,
Algorithm::Loops, written by tye, is fast and efficient. It can properly handle duplicates unlike Algorithm::Permute and it is also pure Perl.
#!/usr/bin/perl -w use strict; use Algorithm::Loops 'NestedLoops'; my $length= 4; my @chars = ('a' .. 'd'); my $get_combo = NestedLoops([ (\@chars) x $length ]); my @combo; while ( @combo = $get_combo->() ) { print "@combo\n"; }
Cheers - L~R