# Create an anonymous arrayref my $arrayref = [1,2,3]; # Create a reference to an existing array my @array = (1,2,3); my $arrayref2 = \@array; # Get a single value from the arrayref: my $one = $arrayref2->[0]; # Get all the values from the arrayref: my ($one,$two,$three) = @$arrayref2;