You've severly misunderstood the use of splice. Did you read the docs?
@a = qw(a b c d ); undef $a[2]; $b{x} = 10 ; $b{$_} = 1 foreach grep defined, @a;
or
@a = qw(a b c d ); splice(@a, 2, 1); $b{x} = 10 ; $b{$_} = 1 foreach @a;
In reply to Re^3: from array to hash
by ikegami
in thread from array to hash
by jeanluca
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |