RosettaCodeData/Task/Arrays/Perl/arrays-1.pl
2016-12-05 22:15:40 +01:00

8 lines
203 B
Perl

my @empty;
my @empty_too = ();
my @populated = ('This', 'That', 'And', 'The', 'Other');
print $populated[2]; # And
my $aref = ['This', 'That', 'And', 'The', 'Other'];
print $aref->[2]; # And