note
sumathigokul
<p>Hi kcott,</p>
<p>First of all thank you for your reply and Good day to you...I have modified the code, so that it extracts the data from one file and copies those statements to new file...But, its not copying...
<code>
use strict;
use warnings;
my $re = qr{ \A \s+ ( \d+ ) }x;
my $high = 0;
my @lines;
open (F1, "<designer.log") or die ;
open (F2, ">>new_lines.txt") or die;
while (<F1>) {
/$re/ or next;
my $num = $1;
next if $num < $high;
if ($num > $high) {
$high = $num;
@lines = ();
}
push @lines, $_;
print F2 @lines;
}
print "Highest number: $high\n";
close (F1);
close (F2);
</code>
<p>
Correct me if its wrong....</p>
1125789
1125793