**30**wrote:

Hi

I have a multiple column text file, i need to count rows those have only numbers (1....100) in columns [2], [3], [4], [5], else ignore if columns [2], [3], [4], [5] have 0 numbers like yellow. i am trying a following Perl script ..

#########################

file example

#####################

AG123.4 1234 1 3 4 1

AG123.5 3456 0 0 0 0

AG654.8 9876 4 1 0 0

AG654.7 9999 0 0 1 0

#############################

perl script

############################

open(FILE, "<all.txt") or die "Could not open file: $!"; my @lines = 0; my @column=0; my $count1=0; my $count2=0; while (<FILE>) { chomp; $lines++; $column= split (/\t/); $column++; if (@column==0) { $count1++; } elsif (@column>0) { $count2++; } } print("lines=$lines column=$column\n"); print "total number of zero in column 1:=", $count1[1],"\n"; print "total number of greater number of zero in column 1:=", $count2[1],"\n"; print "total number of zero in column 2:=", $count1[2],"\n"; print "total number of greater number of zero in column 2:=",$count2[2],"\n"; print "total number of zero in column 3:=", $count1[3],"\n"; print "total number of greater number of zero in column 3:=", $count2[3],"\n";