basm101 has asked for the wisdom of the Perl Monks concerning the following question:
So I'm trying to say: if this key exists, don't create it again.if(exists($matrixhash{$key})){ print "Key exists ! \n"; <STDIN>; }else{ #it doesn't print "$key stored as a key here\n"; # ADD KEY AND VALUE TO HASH push(@{$matrixhash{$key}},$store); print "key is $key and value is @{$matrixhash{$key}}\n"; #<STDIN>; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: checking keys exist in 1 key:multiple value situation
by robartes (Priest) on Jan 30, 2003 at 11:29 UTC | |
|
Re: checking keys exist in 1 key:multiple value situation
by PodMaster (Abbot) on Jan 30, 2003 at 11:29 UTC | |
by basm101 (Acolyte) on Jan 30, 2003 at 11:45 UTC | |
by PodMaster (Abbot) on Jan 30, 2003 at 11:51 UTC | |
|
Re: checking keys exist in 1 key:multiple value situation
by Gilimanjaro (Hermit) on Jan 30, 2003 at 13:50 UTC |