in reply to Re: Homework Golf (35)
in thread Homework Golf
On *nix ... one shorter still:Two more strokes can be shaved I believe (untested, no Unix box available right now):#23456789_123456789_123456789_123456789_1234 perl -nlE'unpack("%c*",$_&"\c_"x30)-65||say' words.txt
Update: an alternative using v31:#23456789_123456789_123456789_123456789_12 perl -nlE'65^unpack"%c*",$_&~"`"x30or say' words.txt
#23456789_123456789_123456789_123456789_12 perl -nlE'65^unpack"%c*",$_&v31 x30or say' words.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Homework Golf (35)
by BrowserUk (Patriarch) on Dec 05, 2013 at 09:56 UTC | |
|
Re^3: Homework Golf (35)
by Grimy (Pilgrim) on Dec 06, 2013 at 09:14 UTC | |
by McD (Chaplain) on Dec 09, 2013 at 18:18 UTC | |
by eyepopslikeamosquito (Archbishop) on Dec 09, 2013 at 19:14 UTC |