in reply to Anonymous scalar ref revisited
does elegant imply as fast as possible?
if not, why simply call a function scref() returning what you need? ¹
the thread you linked to, has already other fast options, you haven't listed yet.
Cheers Rolf
UPDATE: (¹) just spotted your NULLREF() (was it updated?) going in the same direction, just that your code is wrong, you don't return a ref!
correction:
# Solution 4 sub NULLREF { \ my $x } f(NULLREF);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Anonymous scalar ref revisited
by rovf (Priest) on Apr 06, 2010 at 11:24 UTC |