On 8/31/06, Eric Wilhelm <[EMAIL PROTECTED]> wrote:
>
> Another way to call it (or, more commonly, you want the value of a
> constant -- but we should be using Readonly now, right?), put a
> unary + before it.
>
> $ perl -wle 'sub f(){print "called f"; "thbbt" }; $h{+f} = 4; print keys %h'
> called f
> thbbt
>
> --Ericunary plus not turning its argument into a number has always bothered me a little. It's a short way to say scalar(f) but it has some side effect such that ~~ is preferred in golf -- perhaps simply that ~~ will not bind to whatever is left of it and try to do addition. ~~, the double tilde, does bitwise xor on its argument, twice. -- Although efforts have been taken to mitigate the problem, this message may contain flippancy, hyperbole and/or confusing assertions. Please reply directly to [EMAIL PROTECTED] for clarification of any points appearing unclear, vague, cruel, frustrating, threatening, negative, dilletantish or otherwise unprofessional before taking action based on misintepretation or misconstruction of such points: the world is complex and we're all in it together. _______________________________________________ kc mailing list [email protected] http://mail.pm.org/mailman/listinfo/kc
