#!/usr/local/bin/perl # usage: chop.p 38 39 file # causes lines 38-39 of file to be printed $i = $ARGV[0]; shift; $j = $ARGV[0]; shift; $k=0; print STDERR "chopping " , $i , "-" , $j , "\n" ; if ( $j < $i ) { print STDERR "error\n"; exit ; } while( ( $_ = <> ) && ( $k++ < $j ) ){ if($k>=$i){ print $_ ; } }