programming-examples/perl/Array/Lists of Lists.pl
2019-11-15 12:59:38 +01:00

11 lines
249 B
Perl

#!/bin/perl
my $arrays = [ '1', '2', '3', [ 'red', 'blue', 'green' ]];
for($i=0;$i<3;$i++){
print $arrays->[$i],"\n";
}
for($i=0;$i<3;$i++){
print $arrays->[3]->[$i],"\n";
}
print "@{$arrays}\n";
print "--@{$arrays->[3]}--", "\n";