in reply to Re^6: Using exists to check element in array
in thread Using exists to check element in array
In hindsight, this existence-by-reference trick works for hashes too. Hence it's at least consistent.
The big question is now, if and what rationale there this.
Probably not really a problem at all.
DB<1> %x=(a=>1) DB<2> $a= \$x{b} DB<3> p exists $x{b} 1 DB<4> p exists $x{a} 1 DB<5> p exists $x{c} DB<6>
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^8: Using exists to check element in array (existence-by-reference for hashes too)
by ikegami (Patriarch) on Feb 01, 2024 at 17:03 UTC |