From: Stefano Taschini Date: 2006-04-24T00:40:36+09:00 Subject: Re: [QUIZ] Text Munger (#76): A solution You are absolutely right, of course. I hope that my mistake did not distract anybody from the point I was trying to make. Stefano On 23/04/06, ts wrote: > >>>>> "S" == Stefano Taschini writes: > > S> I might have written lines 10 and 11 together as > > S> $1 + $2.scan(Letter).sort_by{rand}.join}) > > S> but you don't have to be a C programmer to understand that using > S> global variables together with functions that alter them within two > S> sequence points is a bad idea > > $~ is not a global variable : it's a local and thread-local variable (like > $_) > > $1 ($2, ...) make reference to the first (second, ...) substring matched. > > > Guy Decoux > > > > > > > >