##
The
cat 300
catches
the
hen 400
...
##
##
#!/usr/bin/perl
use strict;
use utf8;
use warnings;
open PARAM, "param" or die $!;
open DEV, "sent" or die $!;
my %counts;
my @dev;
while(){
chomp;
@dev = ;
}
while() {
chomp;
my($count, $word) = split / /;
$counts{$word} = $count;
}
foreach my$word_dev(@dev){
if(exists $counts{$word_dev}){
print "$word_dev $counts{$word_dev}\n";
}
}