in reply to how to use "delete" with a hash of hash
Hello brassbin,
smls++ has answered your question, but it occurs to me: if you don’t have a variable named $item2, either use strict or use warnings would have shown the error. With warnings:
Name "main::item2" used only once: possible typo at...
and with strict:
Global symbol "$item2" requires explicit package name at...
Moral: Always begin each script with:
use strict; use warnings;
It’s often useful to have:
use diagnostics;
as well, to clarify any warnings or error messages.
Hope that helps,
Athanasius <°(((>< contra mundum | Iustus alius egestas vitae, eros Piratica, |
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: how to use "delete" with a hash of hash
by brassbin (Novice) on Jan 29, 2013 at 05:10 UTC | |
by muba (Priest) on Jan 29, 2013 at 05:44 UTC |
In Section
Seekers of Perl Wisdom