Dave Storrs wrote:
[...] Just as an aside, this gives me an idea: would it be
feasible to allow the base to be specified as an expression instead of
a constant? (I'm pretty sure it would be useful.)  For example:



4294967296:1.2.3.4      # working with a really big base, hard to grok
2**32:1.2.3.4           # ahhhhh, much better

I very much hope that perl will do constant propagation as a compile-time optimization. So you could just write:

eval( 2**32 _ ":1.2.3.4" ); # or whatever strcat is, this week.

or

literal("$(2**32):1.2.3.4"); # have we decided on the fn name yet?


Dave.

Reply via email to