in reply to Re: optimization - exists should return a reference
in thread optimization - exists should return a reference
I don't quite follow you?
print $$ref if my $ref = exists %hash{something);
Update Above replaced after Abigail-II's post below.
print $$_ if $_ = exists $hash{something);
Regardless of what false value is returned by exists if the thing doesn't exist, the if will be false and so $ref will never be dereferenced.
Or am I missing something as usual?
Examine what is said, not who speaks.
The 7th Rule of perl club is -- pearl clubs are easily damaged. Use a diamond club instead.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: optimization - exists should return a reference
by Abigail-II (Bishop) on Jan 15, 2003 at 13:39 UTC | |
by BrowserUk (Patriarch) on Jan 15, 2003 at 14:02 UTC |