my $array = [qw(1 2 3)]; my $array_len = @$array; # $array_len == 3 #### use constant STEPPER_SEQUENCE => [ [qw(1 0 0 1)], [qw(1 0 0 0)], [qw(1 1 0 0)], [qw(0 1 0 0)], [qw(0 1 1 0)], [qw(0 0 1 0)], [qw(0 0 1 1)], [qw(0 0 0 1)], ]; #### use warnings; use strict; use feature 'say'; use constant STEPPER_SEQUENCE => [ [qw(1 0 0 1)], [qw(1 0 0 0)], [qw(1 1 0 0)], [qw(0 1 0 0)], [qw(0 1 1 0)], [qw(0 0 1 0)], [qw(0 0 1 1)], [qw(0 0 0 1)], ]; # the below line houses the normal "ARRAY(0x...)" use constant STEP_COUNT => STEPPER_SEQUENCE; # ... and because STEPPER_SEQUENCE returns the "ARRAY(0x...)", # this fails: say "const ok" if STEPPER_SEQUENCE == 3; my $aref = [qw(1 2 3)]; say "aref ok" if @$aref == 3; #### @{ STEPPER_SEQUENCE } @( STEPPER_SEQUENCE ) (STEPPER_SEQUENCE) @STEPPER_SEQUENCE etc, etc, etdc