Base conversion: not enough rope

2011-05-06 Thread Carl Mäsak
S02:3185-3280 does a nice job of explaining what can and cannot be done with the radix syntax (i.e. :2<1010> etc). I'm left with two questions, however: * If :2<1010> is the way to way to "interpret" a string as a number in base two, giving the number 10 -- what's the way to go in the other direct

eval should throw an exception on compile error

2011-05-06 Thread Michael G Schwern
I was just playing around with eval, trying to figure out if you can define an operator overload at runtime (seems you can't, good) and noticed this in the spec... [1] "Returns whatever $code returns, or fails." How does one get the compile error from an eval? What's the equivalent to $@? I