suppose u have a file 1 0.4 2 1 0.2 -5 1 0.1 -18 1 0.11 7 0 0.13 10 0 0.22 11 #### From the second column and third column , u want to show at different intervals keeping second column fixed and change the interval in the third column. Like at less than 0.01 from the scond column and <9 and <8 how many numbers are there in one output then again keeping 0.01 same as above and then <8 and >7 how many numbers ...respectively Then change the interval from less than 0.01 to >0.01 and less tahn 0.02 in the second column and again start from the third column with <9 and >8 respectively #### #!/usr/bin/perl -w open (FILE,"$ARGV[0]") or die; open (WRITE,">ca_0.01_1.txt"); @list =; close (FILE); my $f =join ("",@list); my @t = split ("\n",$f); foreach (@t) { my @x = split("\t",$_); if(($x[1]<=0.01) && ($x[0]=="0")) { next if ( $x[2]>=-8); next if ($x[2]<-9); #next if ($x[0]!=0); #next if ($x[0]!=1); print WRITE @x,"\n"; } } close (WRITE); exit;