in reply to Re^2: from array to hash
in thread from array to hash
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;
|
|---|