http://www.perlmonks.org?node_id=980825


in reply to Re: System command not working
in thread System command not working

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.