my @x = (1,2,3,4); #declare and initialize an array
my $r = \@x;
print "second element is $$r[1]\n";
print "third element is ${$r}[2]\n";
