To give a good answer, i would need to know which fields you expect to be unique, because otherwise, the act of placing the data in a hash will mangle it. Assuming you want something line field 1 as a key, and all other fields as a value, i might suggest :
while (my $line = <FH>) {
my @a = split(/\|/,$line);
my $b = shift(@a);
$HASH{$b} = \@a;
}
print "LIne 2 : ",join(',',$HASH{'LIne 2'}),"\n";
The requirements change because they don't know what they want, or how much they own you.