#!/usr/bin/perl
use strict;
use warnings;
use 5.010;
{
my $scalar = "scalar";
say $scalar;
my @array = ("arr1","arr2");
say @array;
say "@array";
say "$array[0], $array[$#array]";
my $arr_size = @array;
say $arr_size;
my @arr = (@array, 1, 2, 3);
say "@arr";
my @ref = (\@array, 1, 2, 3);
say $ref[0][0];
say $ref[1];
my $arrayref = [\@array, 1, [2, 3]];
say $arrayref->[0][0];
say $arrayref->[1];
say $arrayref->[2][0];
my %hash = (
abc => "hash",
0 => 1,
);
say "$hash{abc} $hash{0}";
my %nested = (
abc => { def => "nested" },
0 => 1,
);
say "$nested{abc}->{def} $hash{0}";
say "$nested{abc}{def} $hash{0}";
my $hashref = {
abc => "hashref",
0 => 1,
};
say "$hashref->{abc} $hashref->{0}";
}
exit;