That is, use a negative lookahead to check the word doesn't appear again. Saves you joining, splitting, grepping, and mapping :). I have not benchmarked it, though.print "$_\n" for sort <> =~ /\b(\S+)\b(?!.*\b\1\b)/g
In reply to Re: promoting array to a hash
by Jasper
in thread promoting array to a hash
by sleepingsquirrel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |