#!/usr/bin/perl -w use Data::Dumper; my %hash = ('foo' => 'bar', 'camel' => 'beast', 'bug' => 'spray'); my %newhash = %{ eval Dumper \%hash };