Hi again,
I did some testing on the method I meantioned before here is the code:

#!/usr/bin/perl
use warnings;
use strict;

my $a = 'a.txt';
my $b = 'b.txt';

if(-s $a != -s $b){
print "Files differ\n";
 open F1,">>$a" or die "Can't open: $!";
 open F2,"<$b" or die "Can't open: $!";
 seek F2,-s $a,0;
 print F1 $_ while <F2>;
 close F1;
 close F2;
} else { print "Files did not change\n"; }


File a.txt contents:
This is a line

File b.txt contents:
This is a line
another line
and another

File a.txt contents after running the script:
This is a line
another line
and another

I think this might be what you wanted but you will probably want to
adjust it to your code.

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to