En op 22 oktober 2002 sprak Gareth McCaughan: > What's particularly embarrassing is that I *tested* it. > How could that possibly have worked, I hear you ask? > Simple. Excerpt from my little test program: > > print subst("$2, $1 and $3"), "\n";
My fault. I cut and pasted the original problem specification, not the corrected one: subst('$2, $1 and $3') Sorry 'bout that. I have confirmed (-ugene's solution as correct weight, and am feeling very guilty whittling one stroke from: sub subst{join'',map--$|?$_:eval,split/(\$\d+)/,$_[$|=0]} to: sub subst{join'',map--$|?$_:$$_,split/\$(\d+)/,$_[$|=0]} because it was not my idea. No, I am not saying whose idea it was, but he is not a regular golfer (to the best of my knowledge). /-\ http://careers.yahoo.com.au - Yahoo! Careers - 1,000's of jobs waiting online for you!