# from David Nicol
# on Thursday 31 August 2006 02:59 pm:
># perl -wle 'sub f(){print "called f"}; $h{ f() } = 4; print keys %h'
>called f
>1
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
--Eric
--
The opinions expressed in this e-mail were randomly generated by
the computer and do not necessarily reflect the views of its owner.
--Management
---------------------------------------------------
http://scratchcomputing.com
---------------------------------------------------
_______________________________________________
kc mailing list
[email protected]
http://mail.pm.org/mailman/listinfo/kc