my %hash=(a=>1,b=>2); system("echo", $hash{a}) == 0 or die; #### use File::Copy; my %hash=(a=>1,b=>2); copy($hash{a}, $hash{b}) or die $!;