[Solved] how to reverse a hash in perl without using built in function? [closed]


You should really learn Perl – it is really fun when you learn it yourself.

It is really that simple:

my %rev;
foreach my $key (keys %hash) {
    $rev{$hash{$key}} = $key;
}

3

solved how to reverse a hash in perl without using built in function? [closed]