in reply to Re^4: Counting occurence of a list of word in a file
in thread Counting occurence of a list of word in a file

It's an improvement !

If your File_Input/Testo.txt file contains more than one line, then I suggest

$arrayris{$key} += $count ;
will produce a more complete result. (Perl will happily create an hash entry with (effectively) a zero value when required.)

You could also consider counting directly in your %arrayris:

while ($text =~ /\b$key\b/ig) { $arrayris{$key}++ ; } ;

Other things you might consider: