#!/usr/bin/perl use strict; use warnings; use Data::Dumper; my %hash = ( a => ['1', '2'], b => ['2', '3'], c => ['1', '2'] ); my %temp = map {(join 'x', @{$hash{$_}}) => $_} keys %hash; my %d_duped = map {$temp{$_}, [split 'x', $_]} keys %temp; print Dumper \%d_duped;