I have two data structures in Perl:
An array:
my @array2 = ( \"1\", \"2\", \"3\");
for $elem (@array2) {
print $elem.\"\\n\";
}
<
If you want more clarification, see the relevant documentation.
You could try and do some things for illustration purposes:
#!perl -lw # -l appends a \n to each print, -w enables warnings
use strict;
my $aryref = [1 .. 5];
print for $aryref; # Prints the stringified reference - not what you want
print for @$aryref; # Dereferencing it lets you access the array
my @ary = $aryref; # Probably not what you want
print for @ary; # Stringified reference again
print for @{$ary[0]}; # Dereference the first array element (which holds the ref)