[ create a new paste ] login | about

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

skeletonkey - Perl, pasted on Feb 18:
1
2
3
4
5
6
7
8
my @x = qw(1 2 3 4 5 6);
my @y = @x;

print "y List:\n" . join("\n", @y) . "\n";

$y[1] = '500';
print "y List after:\n" . join("\n", @y) . "\n";
print "x List after:\n" . join("\n", @x) . "\n";


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
y List:
1
2
3
4
5
6
y List after:
1
500
3
4
5
6
x List after:
1
2
3
4
5
6


Create a new paste based on this one


Comments: