Thread exists() auf hashref? (4 answers)
Opened by Froschpopo at 2006-02-28 05:14

Ronnie
 2006-02-28 07:07
#63325 #63325
User since
2003-08-14
2022 Artikel
BenutzerIn
[default_avatar]
[quote=Froschpopo,28.02.2006, 04:14]ich hab ne $hashref.
kann man da auch nen exists() anwenden?[/quote]
Man kann - aber nicht ohne Nebenwirkungen. Siehe http://perldoc.perl.org/functions/exists.html:
Quote
Although the deepest nested array or hash will not spring into existence just because its existence was tested, any intervening ones will. Thus $ref->{"A"} and $ref->{"A"}->{"B"} will spring into existence due to the existence test for the $key element above. This happens anywhere the arrow operator is used (...)

View full thread exists() auf hashref?