in reply to creating all possible random 'words' from 4 letters
use Algorithm::Permute; my $p = new Algorithm::Permute(['a'..'d']); while (@res = $p->next) { print join(", ", @res), "\n"; } [download]