1#!/usr/bin/perl 2use strict; 3my $file; 4my $i; 5my $line; 6 7 $file = 'verilog.log'; 8 if (@ARGV == 1) 9 { 10 $file = $ARGV[0]; 11 } 12 13 open(FILE, $file) or die "Can't open $file\n"; 14 open(TMP, '>tmp') or die "Can't open tmp file\n"; 15 for($i = 0; $i < 3; $i++) 16 { 17 $line = <FILE>; 18 } 19 while(<FILE>) 20 { 21 print TMP $_; 22 } 23 close TMP; 24 close FILE; 25 rename 'tmp', $file; 26