@n = grep $_, @n;
####
@n = grep defined, @n;
####
@n = grep defined and length, @n;
####
for(my $count = 0;
$count < @myarray; )
{
unless(defined $myarray[$count])
{ splice @myarray, $count, 1; }
else{ $count++ }
}
####
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?