Reference a dereferenced array by index
#!/usr/bin/perl -w
use strict;
my @band = qw(A B C D);
my $ref = \@band;
foreach (0..$#band) {
print "Array : ", $band[$_] , "\n";
print "Reference: ", ${$ref}[$_], "\n";
}
Related examples in the same category