@a = qw(a b c d ); undef $a[2]; $b{x} = 10 ; $b{$_} = 1 foreach grep defined, @a;