#!/usr/bin/perl

my @x = (1,2,3,4); #create a list with four entries
my @y = @x;	#copy the elements from @x to @y

$x[1] = 5;	#change one element in the x array
print "after change x is @x\n"; #1 5 3 4 - as expected, element changed

print "after change y is @y\n"; #still 1 2 3 4 #as expected,  unchanged

@x = ("one","two"); #re-assign to the array x
print "the new x is @x\n";  #as expected

print "and after the new assignment y is @y\n"; #y not changed
    # as would be expected 
