in reply to Re^2: If exists (hash)
in thread If exists (hash)
My basic question is how to print a hash key that will only be there in some records. I thought the "if exists" might work but it clearly doesn't.
Um, your code fragment is incomplete, it does not demonstrate "if exist" not working
See Access Hashes of Hashes etc. and Re^2: Unique value count in hash not working properly
$ perl -Mstrict -e " my $foo = { 1, 1 }; exists $foo->{1}{2} " Can't use string ("1") as a HASH ref while "strict refs" in use at -e +line 1.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: If exists (hash)
by packetstormer (Monk) on Oct 06, 2011 at 15:09 UTC | |
by choroba (Cardinal) on Oct 06, 2011 at 15:12 UTC | |
by packetstormer (Monk) on Oct 06, 2011 at 15:28 UTC | |
by Anonymous Monk on Oct 06, 2011 at 15:30 UTC |
In Section
Seekers of Perl Wisdom