Tuesday, March 06, 2012

[elvpehdr] Word sampler

Another script to generate a list of words for typing practice. All letters tend to show up.

#! perl -w open FI,'/usr/share/dict/words' or die; while(<FI>){ next unless /^[a-z]+$/; next if (length$_>6); push @w,$_; } for(;;){ $letter=chr(ord('a')+rand 26); for(;;){ $_=$w[rand@w]; last if /$letter/; } print; }

No comments :