my $ar1 = [qw(this is another element)]; my $ar2 = [ 'this','is','another','element']; my @a1 = ('this','is','another','element'); my @a2 = (qw(this is another element)); printf " \$ar1 has %s elements \$ar2 has %s elements \@a1 has %s elements \@a2 has %s elements ", scalar @$ar1, scalar @{$ar2}, scalar @a1, scalar @a2;