in reply to Re: Re: Re: optimization - exists should return a reference
in thread optimization - exists should return a reference

Right now, we can only use exists as a boolean. The suggestion is to extend it so that when the value returned is true that value is itself useful.

Assume for a minute that the hypothetical reference-that-evaluates-to-false-in-boolean-context actually could be returned... what use would it be to dereference it anyway?

If you really wanted something like that, you could forge it yourself:

my $bar = ${exists($foo{bar}) || \undef};

-sauoq
"My two cents aren't worth a dime.";