I have a file I need to check everyday to see if a word has changed.
In this word only the third and fourth numbers change but I dont know how to check for changes.
The word to check is called: 1367ftot where the third(6) and fourth number (7)
need to be checked everyday for changes.
Please I need alot of help with getting this to work. I dont even know if I am in the right direction??
[tt]
open(A,"<file1"
|| die "error: $!";
@arrayA = (<A>);
foreach (@arrayA)
$file1 =~ /13\d{2}ftot/;
close(A);
#Somehow make a copy of the file each day and check if it has changed??
open(B,"<file2"
|| die "error: $!";
@arrayB = (<B>);
foreach (@arrayB)
$file2 =~ /13\d{2}ftot/;
close(B);
if ($file1 != $file2)
{
print "Data has been changed\n";
}
[/tt]
In this word only the third and fourth numbers change but I dont know how to check for changes.
The word to check is called: 1367ftot where the third(6) and fourth number (7)
need to be checked everyday for changes.
Please I need alot of help with getting this to work. I dont even know if I am in the right direction??
[tt]
open(A,"<file1"
@arrayA = (<A>);
foreach (@arrayA)
$file1 =~ /13\d{2}ftot/;
close(A);
#Somehow make a copy of the file each day and check if it has changed??
open(B,"<file2"
@arrayB = (<B>);
foreach (@arrayB)
$file2 =~ /13\d{2}ftot/;
close(B);
if ($file1 != $file2)
{
print "Data has been changed\n";
}
[/tt]