Thread exists() legt Hashkeys an (14 answers)
Opened by bloonix at 2007-02-22 20:24

bloonix
 2007-02-22 20:24
#74517 #74517
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
Hallo Community,

heute bin ich auf etwas sehr unangenehmes gestoßen:

Code: (dl )
1
2
3
4
5
6
7
8
9
10
use strict;
use warnings;
use Data::Dumper;

my %hash;

print "key foo->bar exists\n"
if exists $hash{foo}{bar};

print Dumper(\%hash);


$VAR1 = {
'foo' => {}
};


Kann ich das irgendwie umgehen? Der Key 'foo' wird einfach angelegt.

Gruss,
opi
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread exists() legt Hashkeys an