I downloaded your code and input file, running them I get this output:
in reply to hash of arrays
Where are you running your code? Perl version , OS, Locale ?
mv89psg6zh4: A bird in a sink keeps getting under the running water fr
+om a faucet. A bird is bathing in a sink. A bird is splashing around
+under a running faucet. A bird is bathing in a sink. A bird is standi
+ng in a sink drinking water that is pouring out of the facet. A fauce
+t is running while a bird stands in the sink below. A bird is playing
+ in a sink with running water. A bird is playing in tap water. A bird
+ is bathing in the sink. A bird is taking a bath.
% perl --version
This is perl 5, version 12, subversion 3 (v5.12.3) built for darwin-th
(with 2 registered patches, see perl -V for more detail)
% uname -a
Darwin femto.local 11.0.1 Darwin Kernel Version 11.0.1: Thu Jul 28 02:
+01:39 PDT 2011; root:xnu-1699.23.4~1/RELEASE_X86_64 x86_64