#!/usr/bin/perl my @a = (1, 2, 3); my @b = @a; $a[1] = 'x'; foreach my $i (@b) { print "$i\n"; }