errodr
07-23-2002, 07:52 AM
I have a difficult problem, which I'm sure someone here will be
able to figure out quickly.
Problem:
I have two files (.txt) each file contains a list of page titles.
What I need to do is take File A (the Master list) remove from
it page titles that appear in File B (the a page title subset).
Basically I need to take the page titles that appear in File B
and remove those titles from File A.
I have tried this, and it simply spits out File A with no changes.
--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------
open(FILEB,"FileB.txt")||die;
while(<FILEB>){
$file1hash{$_}=1;
}
close(FILEB);
open(OUTPUTFILE,">new_report.txt")||die;
open(FILEA,"FileA.txt")||die;
while(<FILEA>){
print OUTPUTFILE $_ unless defined($file1hash{$_});
}
close(FILEA);
close(OUTPUTFILE);
--------------------------------------------------------------------------------
Thanks a lot...
able to figure out quickly.
Problem:
I have two files (.txt) each file contains a list of page titles.
What I need to do is take File A (the Master list) remove from
it page titles that appear in File B (the a page title subset).
Basically I need to take the page titles that appear in File B
and remove those titles from File A.
I have tried this, and it simply spits out File A with no changes.
--------------------------------------------------------------------------------
Code
--------------------------------------------------------------------------------
open(FILEB,"FileB.txt")||die;
while(<FILEB>){
$file1hash{$_}=1;
}
close(FILEB);
open(OUTPUTFILE,">new_report.txt")||die;
open(FILEA,"FileA.txt")||die;
while(<FILEA>){
print OUTPUTFILE $_ unless defined($file1hash{$_});
}
close(FILEA);
close(OUTPUTFILE);
--------------------------------------------------------------------------------
Thanks a lot...