[ create a new paste ] login | about

Link: http://codepad.org/murY8cP1    [ raw code | output | fork ]

skeletonkey - Perl, pasted on Feb 22:
1
2
3
4
5
6
7
8
9
10
11
my %x = (one => 1, two => 2, three => 3, four => 4, five => 5, six => 6);
my %y = %x;

print "y List:\n";
print "\t$_ -> $y{$_}\n" for keys %y;

$y{one} = '500';
print "\ny List After:\n";
print "\t$_ -> $y{$_}\n" for keys %y;
print "\nx List After:\n";
print "\t$_ -> $x{$_}\n" for keys %x;


Output:
y List:
	three -> 3
	one -> 1
	five -> 5
	six -> 6
	two -> 2
	four -> 4

y List After:
	three -> 3
	one -> 500
	five -> 5
	six -> 6
	two -> 2
	four -> 4

x List After:
	three -> 3
	six -> 6
	five -> 5
	one -> 1
	two -> 2
	four -> 4


Create a new paste based on this one


Comments: