RosettaCodeData/Task/Arrays/Perl/arrays-1.pl

9 lines
203 B
Perl
Raw Permalink Normal View History

2016-12-05 22:15:40 +01:00
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