From: Ross Bamford Date: 2006-04-22T19:28:54+09:00 Subject: Re: Text Munger (#76) On Sat, 2006-04-22 at 06:09 +0900, James Edward Gray II wrote: > On Apr 21, 2006, at 3:34 PM, Bill Kelly wrote: > > > From: "Andrew Johnson" > >> > >> As a script, my one-liner is down to 70 chars including > >> the newline. It can be shortened a bit as a command-liner. > >> :-) > > > > Wow, nice. Does that include the restriction in the quiz rules that > > numbers have to be left alone? Or does your solution rearrange > > both numbers and letters? > > I'm still waiting for someone to show off their solution properly > handling the trivial (multi-byte) example I showed earlier... :) $ ./munger.rb test.txt Attehcaed is my r辿smu辿. $ ./munger.rb test.txt Atthaceed is my r辿ums辿. $ ./munger.rb test.txt Attacheed is my r辿msu辿. $ ./munger.rb test.txt Attcaehed is my r辿mus辿. $ ./munger.rb test.txt Attecahed is my r辿msu辿. It's four lines though. -- Ross Bamford - rosco@roscopeco.REMOVE.co.uk