I am very grateful for all the useful explanations you have provided. As you know, I am very beginner of perl, i tried to modify your provided code, because it didn't worked for me. I can see the logic for your code. But please let me ask you something. Following of your code isn't giving any output when i use it for 25 files. Please tell me how to fix it.
#!/usr/bin/env perl
use strict;
use warnings;
use autodie;
my @files = glob 'pm_1206312_in*';
my %uniq;
{
open my $fh, '<', shift @files;
while (<$fh>) {
my ($k, $v) = split;
$uniq{$k} = $v;
}
}
for my $file (@files) {
my %data;
open my $fh, '<', $file;
while (<$fh>) {
my ($k, $v) = split;
$data{$k} = $v;
}
for (keys %uniq) {
delete $uniq{$_} unless exists $data{$_} and $uniq{$_} eq $dat
+a{$_};
}
}
printf "%s %s\n", $_, $uniq{$_} for sort keys %uniq;