in reply to Re^4: howto accomodate multiple values
in thread howto accomodate multiple values

for my $role (sort keys %$href ){ my $key; if (!exists $sequences{$key}){ # line 33
While $key is declared it is uninitialized which is what Perl is complaining about when it tells you: "use of uninitialized value in exists at sample.pl line 33". Changing each mention of $key to $role gives
12345 21 GCT 12345 42 CAG 67891 32 GCA
I can't tell if that is what you were expecting. I would consider choosing a better name for $href.