#!/usr/bin/perl -l use strict; use warnings; use Data::Dumper; my @array = 0..4; my $ref1 = \@array; my $ref2 = \@array; my $copy1 = [@array]; my $copy2 = [@array]; print Dumper $ref1,$copy1; print for ($ref1,$ref2,$copy1,$copy2); undef @array; print Dumper $ref2,$copy2;