use Data::Dumper; @ry=qw/ a b c d /; @ry2=$ry[0]; printf "First array:\n"; print Dumper(\@ry); printf "Second array:\n"; print Dumper(\@ry2);