in reply to Perl Golf idea
Here is a summary of replies to this little informal golf contest. I hope there will be more replies.
brx
perl -E'@a=sort pop=~/./g;print grep@a~~[sort//g],<>' ./dict.txt acertJavaFan, with the second argument getting printed (a dummy line must be added at the begining of dict.txt)
perl -nlE'sub w{[sort/./g]}$w||=w$_=pop;$w~~w&&say' ./dict.txt acertbrx, with an extra newline after last line printed
perl -E'@a=sort pop=~/./g;say grep@a~~[sort//g],<>' ./dict.txt acertUpdate: thundergnat
perl -nlE'($w//=[sort pop=~/./g])~~[sort//g]&&say' ./dict.txt acert
|
|---|