kevester has asked for the wisdom of the Perl Monks concerning the following question:
But this will compare line 1 against line 2 and then line 3 against line 4.while (my $timeOne = <INPUTFILE>) { my $timeTwo =<INPUTFILE>; print OUTPUTFILE "timeOne: $timeOne"; print OUTPUTFILE "timeTwo: $timeTwo"; my $result = $timeTwo - $timeOne; print OUTPUTFILE "result = $result \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: compare subsequent lines
by moritz (Cardinal) on Jul 14, 2009 at 15:35 UTC | |
by kevester (Initiate) on Jul 14, 2009 at 15:58 UTC |