Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:

Hi dear Monks
I'm so puzzled with a very stupid error that I cant figure it out. I have my data in a tab separated file as:

mv89psg6zh4 A bird in a sink keeps getting under the running water +from a faucet.
mv89psg6zh4 A bird is bathing in a sink.
mv89psg6zh4 A bird is splashing around under a running faucet.
mv89psg6zh4 A bird is bathing in a sink.
mv89psg6zh4 A bird is standing in a sink drinking water that is pou+ring out of the facet.
mv89psg6zh4 A faucet is running while a bird stands in the sink bel+ow.
mv89psg6zh4 A bird is playing in a sink with running water.
mv89psg6zh4 A bird is playing in tap water.
mv89psg6zh4 A bird is bathing in the sink.
mv89psg6zh4 A bird is taking a bath.

What did you expect to see? Have you noticed that for your sample data all the keys are the same? Is that what you intended?

A useful trick that will help us solve your problem for you is to combine your data and sample code as follows:

use strict;
use warnings;
use open IN => ':utf8';
use open OUT => ':utf8';
use Encode;
my $str = <<STR;
mv89psg6zh4 A bird in a sink keeps getting under the running water +from a faucet.
mv89psg6zh4 A bird is bathing in a sink.
mv89psg6zh4 A bird is splashing around under a running faucet.
mv89psg6zh4 A bird is bathing in a sink.
mv89psg6zh4 A bird is standing in a sink drinking water that is pou+ring out of the facet.
mv89psg6zh4 A faucet is running while a bird stands in the sink bel+ow.
mv89psg6zh4 A bird is playing in a sink with running water.
mv89psg6zh5 A bird is playing in tap water.
mv89psg6zh5 A bird is bathing in the sink.
mv89psg6zh5 A bird is taking a bath.
STR
my %hash;
open my $inFile, '<:encoding(utf8)', \$str;
while (<$inFile>) {
chomp;
my ($video, $p) = split /\t/;
push (@{$hash{$video}}, $p);
}
print "$_:\n ", join ("\n ", @{$hash{$_}}), "\n" for keys %hash;

mv89psg6zh4:
A bird in a sink keeps getting under the running water from a fauce+t.
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 standing in a sink drinking water that is pouring out of +the facet.
A faucet is running while a bird stands in the sink below.
A bird is playing in a sink with running water.
mv89psg6zh5:
A bird is playing in tap water.
A bird is bathing in the sink.
A bird is taking a bath.

mv89psg6zh4: A bird in a sink keeps getting under the running water fr+om a fauc
et. A bird is bathing in a sink. A bird is splashing around under a ru+nning fau
cet. A bird is bathing in a sink. A bird is standing in a sink drinkin+g water t
hat is pouring out of the facet. A faucet is running while a bird stan+ds 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 bir+d is taking a bath.
$VAR1 = {
'mv89psg6zh4' => [
'A bird in a sink keeps getting under the r+unning water from 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 standing in a sink drinking wate+r that is pouring out of the facet.',
'A faucet is running while a bird stands in+ the sink below.',
'A bird is playing in a sink with running w+ater.',
'A bird is playing in tap water.',
'A bird is bathing in the sink.',
'A bird is taking a bath.'
]
};

This is perl, v5.10.1 (*) built for x86_64-linux-thread-multi
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License+ or the
GNU General Public License, which may be found in the Perl 5 source ki+t.
Complete documentation for Perl, including FAQ lists, should be found +on
this system using "man perl" or "perldoc perl". If you have access to+ the
Internet, point your browser at http://www.perl.org/, the Perl Home Pa+ge.

I downloaded your code and input file, running them I get this output:

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.

Since all your keys were the same I even changed two of them to mv89psg7zh4 and mv89psg8zh4 and again got the expexted output:

mv89psg7zh4: A bird is playing in a sink with running water.
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 bathing+ in the sink. A bird is taking a bath.
mv89psg8zh4: A bird is playing in tap water.