while () { chomp; next if /[^a-z]/; # Lazy way out~ my @chars = split(//, $_); push @{$wordlist{$#chars}}, $_; } #### while ( ) { chomp; next if /[^a-z]/; # Lazy way out~ push @{ $wordlist{ length() } }, $_; }