Re: A new golf "Mayan number converter " has started
"Riley" <[email protected]> Thu, 10 Jun 2004 15:04:24 -0500
| Newsgroups | gmane.comp.lang.perl.golf |
|---|---|
| Organization | Legalbill |
| Message-ID | <[email protected]> |
I was really proud of the following solution because the problem is taken
care of
in a single regex:
-p 1while s#\d*[-.:|]+ ?#$*+=20**y/ //*(5*$&=~y/|//+2*$&=~y/://+$&=~/\./)#e
The problem is that I have to use all those bloody $&=~...
Is there anyway to simplify this with a (?{...}) block in the pattern match
by
somehow setting $_=$&? I tried doing this, but weird things started
happening.
-Riley
(o0lit3)