Re: Comparing two text files.

2003-08-20 Thread Yupapa.com
#!/usr/bin/perl use Fcntl qw(:DEFAULT :flock); use strict; my $file_one= 'file1.txt'; my $file_two= 'file2.txt'; my %file_one_data = (); my %file_two_data = (); sysopen(FILE, $file_one, O_RDONLY); flock(FILE, LOCK_SH); while() {

Comparing two text files.

2003-07-12 Thread Sara
## open (DATA, "data.txt") || die "Cannot open file. Reason: $!"; @data = ; close(DATA); open (LIST, "list.txt") || die "Cannot open list.txt. Reason: $!"; while () { $found = 0; foreach $line (@data) { chomp $line; if ($line eq $_) { $found = 1; last; } $found = 0;