Andrew Savige wrote:
>This appears to be a Linux 5.6.1 bug; the delightfully surreal
>construct '_=eval' does not work on Windows ActivePerl 5.6.1.

Ahh...  so my myopia extends to only two chars, using 5.6.1 as I do.  Still, 
if I could write a regex properly, I could have had a nice 114 :
use overload'""',sub{${$_[0]}},nomethod,a;
sub a{bless\"@_"};s/\s//g+s/(?<!\)|\d)-*\d+/(a"$&")/g;$_=eval;y/ //s;

For some reason the y/// at the end requires a final semicolon, else it 
complains about too many \C and \U options.

Despite not finding the above soln in time, I enjoyed my first round of golf 
greatly, and will certinally be back, regex skills or not.  Regexs are not 
always the answer though, despite what mtv may claim.  For example in the 
minigolf thread "Son of (-ugene's Cantor" the shortest solution given was 
Ton's
-l $_=$"x2**pop;$_="$'/\\",print,s/(?<=\\)../$&^KI^D5/egwhile/^ /
the following is, however, 4 strokes shorter :
-l print$"x--$x,map$x&$_?$"x2:"/\\",0..$_-1for 1..($x=2**pop)

Adam Antonik

Reply via email to