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, |
In reply to Re: how to use "delete" with a hash of hash
by Athanasius
in thread how to use "delete" with a hash of hash
by brassbin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |