in reply to Unique Hash name for each pass

Just out of curiosity are you trying to do something like this
#!/usr/bin/perl use warnings; use strict; my @files = get_files(); my %single_hash; for my $file (@files){ open my $fh, q{<}, $file or die qq{open to read $file failed: $!\n}; my $file_as_string = do{local $/;<$fh>}; push @{$single_hash{$file_as_string}}, $file; } for my $value (values %single_hash){ print qq{@{$value}\n}; } sub get_files{ # stuff return qw{one two three}; }
files one and two
one two three four
file three
one two three four five
output
three one two
Two files (one and two) are the same i.e. not unique. Am I warm?