I don't see anything wrong with what you have, but you may be looking for a hash slice. Leaving out the grep selection stuff,
I'm not sure what you mean by sorted here, hashes don't support any stable order.my %words; while (<>) { @words{ split } = (); }
After Compline,
Zaxo
In reply to Re: promoting array to a hash
by Zaxo
in thread promoting array to a hash
by sleepingsquirrel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |