use strict;
use warnings;
use feature 'say';
# ref() names the kind of thing a ref points to
say ref [1, 2]; # ARRAY
say ref { a => 1 }; # HASH
say ref sub { 1 }; # CODE
my $s = 5;
say ref \$s; # SCALARref names the referent kind