--- Rick Klement <[EMAIL PROTECTED]> wrote: > Phil Carmody wrote: > > > > 2) In 2 days time, I'm going to want some pointers from the gurus > on > > the no doubt obvious tweaks that I could make to my hamming entry > - > > is this the place for such discussions? > > Pointer: drop characters when the code works just as well without > them:
$_=pop;$c.=$w++&$w?(s///,$f^=$w*$&,$&):2while/./;$c=~s|2|1&$f/$+[0]|eg;print"$c " from $_=pop;$c.=$w++&$w?(s/.//,$f^=$w*$&,$&):2while/./;$c=~s|2|1&$f/$+[0]|eg;print"$c " Well I never knew that! At least one character wasn't going to change my position, you lot at the top had a fair safety margin protecting you from us earthlings. Hmmm, if // means last 'succesfully executed' re. what does it mean if it's the first ever re? And Ton - I can't say I know what -l is all about, I read the fine manpage, but as someone who's never once used $/ or $\ the description fell a bit flat. The only solution is to use them more... Cheers guys, I'm most impressed. I shall be coming back for more punishment in the next one :-) Phil ===== -- "One cannot delete the Web browser from KDE without losing the ability to manage files on the user's own hard disk." - Prof. Stuart E Madnick, MIT. So called "expert" witness for Microsoft. 2002/05/02 __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com
