>>232
これで、あってる?
my @vars = (1,undef,3 ,5, 0);
my $count = 0;
foreach(@vars){ defined $_ and $count++ }
print $count;