bopibopi has asked for the wisdom of the Perl Monks concerning the following question:
Hey, i ve writted this code for seq text file comparison, for some reason it doesnt seem to work. I know there's been a lot of similar topics, and i ve sort of tried to compile a solution out of all but to no avail. Really new to perl, can someone help me?
my $file_base = 'CSP8216.TXT'; my $file_filter = 'CSP8216.TXT'; open my $info_filter, $file_filter or die "Die: Could not open $file_f +ilter: $!"; while(my $line_filter = <$infofilter>) { open my $info_base, $file_base or die "Die: Could not open $fi +le_base: $!"; while(my $line_base = <$info_base>) { if("$line_filter"=="$line_base") #if(substr($line_filter, 0, 11)==substr($line_base, 0, + 11)) { print $line_base; } } close $info_base; } close $info_filter;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Perl File Comparison
by toolic (Bishop) on Mar 02, 2016 at 14:13 UTC | |
|
Re: Perl File Comparison
by 1nickt (Canon) on Mar 02, 2016 at 14:12 UTC | |
|
Re: Perl File Comparison
by ExReg (Priest) on Mar 02, 2016 at 14:44 UTC | |
|
Re: Perl File Comparison
by crusty_collins (Friar) on Mar 02, 2016 at 15:34 UTC | |
by 5plit_func (Beadle) on Mar 03, 2016 at 13:31 UTC |