#!/usr/bin/perl use warnings; use strict; my @array = qw(1 2 3 4); my $r = \$array[2]; $$r = 5; print @array;