From: ts Date: 2006-04-23T22:22:05+09:00 Subject: Re: [QUIZ] Text Munger (#76): A solution >>>>> "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