Dear experts,

I think this is a fairly simple question...
How can I count empty values in an array?  This count
should not include zeros or non-empty values.  Below
is my current script, but it isn't working properly.

I appreciate any assistance that you may provide.

Thank you,
David

#!perl -w
# Count missing values
while (my $line = <>) {
    chomp ($line);
    my ($probe_id,$expression) = split /\t/, $line, 2;
    my @expression = split /\t/, $expression;
    my $count = 0;
    foreach my $value (@expression) {
        if (!$value) {
            $count += 1;
        }
    }
    print "$count\n";
}

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
_______________________________________________
Boston-pm mailing list
[EMAIL PROTECTED]
http://mail.pm.org/mailman/listinfo/boston-pm

Reply via email to