my $count = -1; foreach(@myarray) { $count++; if (!defined $_) { splice(@myarray,$count); #delete $myarray[$count]; } } No matter which of these I use, when I print out the array I get a handful of "Use of uninitialized value at line 55". Anyone have any suggestions as to why these little buggers won't go away?