in reply to Re: Best Hash Practices?
in thread Best Hash Practices?
unfortunately not that simple!
outputuse strict; # or die use warnings; # or die my %hash = ( cogito => "ergo sum" # I think, so I exist ); if (exists $hash{absum}{absum}) { print "Absum exists."; } else { print "Absum doesn't exist.\n"; # which would explain it's name... } print "Keys in the hash: ", join(" :: ", keys %hash), "\n";
/usr/bin/perl -w /home/lanx/tst.pl Absum doesn't exist. Keys in the hash: cogito :: absum
Cheers Rolf
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Best Hash Practices?
by muba (Priest) on Oct 10, 2009 at 02:16 UTC |