#!/usr/bin/perl -w use strict; my @array = (1..10); print join(", ",@array),"\n"; sillyfunc(\@array); print join(", ",@array),"\n"; sub sillyfunc{ my $aref = shift; # multiply each element by itself. $_ *= $_ foreach @{$aref}; } __END__ Even if you don't want to modify the original data, refs are used to avoid flattening. @array1=(1,2,3); @array2=('a','b','c'); (@array1,@array2) flattened would equal (1,2,3,a,b,c); What elements belong to which array?