I haven't too much experience with perl, but I was playing with anything like this a few days ago. I readed the Perl Idioms Explained section and get to something like that (for this example):
my %nodups = %{{map{ split /\./ , $_ , 2; } @values}};
I've tested it and it seems to work, but I'm not very sure on some questions:
Does map keeps the order (It seems that it does)? Is this option going to get to much memory with a large input?
Thanks,
deibyz