Thanks for the reply I am doing it in this way :
#/usr/bin/perl -w use strict ; my $outFile= "output.txt"; my $inFile= "infile.txt"; my $start=17; my $end=30; my $perlcmd="perl -ne 'print if \$. >= $start && \$. <= $end' $inFile +>>$outFile"; system($perlcmd);
This is working what I expect but plz tell is this the best way or their is a fast and better way.