http://qs321.pair.com?node_id=1192764


in reply to compare two files and print the differences of file 2 in a third file

Your problem is in this line:

while ( my $line = < GOODFILE> ) {

Try using printto see what you're getting in $line:

while ( my $line = < GOODFILE> ) { chomp $line; print "GOODFILE line: '$line'\n";

Your error should be clear to you if you do this.