Test code:

`#!/usr/bin/perl
use strict;
use warnings;
use Test::More;
sub ten { 10 }
sub ten_() { 10 }
my @expected = ( 9, );
{
my @result = ();
for my $i ( 9 .. 10 - 1 ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 without constant (OP)},
);
}
{
my @result = ();
for my $i ( 9 .. ten() - 1 ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 with constant() (OP)},
);
}
{
my @result = ();
for my $i ( 9 .. ten -1 ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 with constant (OP)},
);
}
{
my @result = ();
for my $i ( 9 .. ( ten() - 1 ) ) {
push @result, $i;
}
is_deeply(
\@result,
\@expected,
q{9 .. 10 - 1 with constant() and parnes (proposed-me)},
);
}
{
my @result = ();
for my $i ( 9 .. ( ten -1 ) ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 with constant and parens (proposed-me)},
);
}
{
my @result = ();
for my $i ( 9 .. ten_() - 1 ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 with constant() (proposed-11143893)},
);
}
{
my @result = ();
for my $i ( 9 .. ten_ - 1 ) {
push @result, $i;
}
is_deeply( \@result, \@expected,
q{9 .. 10 - 1 with constant (proposed-11143893)},
);
}
{
my @result = ();
for my $i ( 9 .. ( ten_() - 1 ) ) {
push @result, $i;
}
is_deeply(
\@result,
\@expected,
q{9 .. 10 - 1 with constant() and parens (proposed-11143893/me)},
);
}
{
my @result = ();
for my $i ( 9 .. ( ten_ - 1 ) ) {
push @result, $i;
}
is_deeply(
\@result,
\@expected,
q{9 .. 10 - 1 with constant and parens (proposed-11143893/me)},
);
}
my @expected_2 = ( 9, 10, );
{
my @result = ();
for my $i ( 9 .. ten ) {
push @result, $i;
}
is_deeply( \@result, \@expected_2,
q{9 .. 10 with constant (OP)},
);
}
{
my @result = ();
for my $i ( 9 .. ten_ ) {
push @result, $i;
}
is_deeply( \@result, \@expected_2,
q{9 .. 10 with constant (proposed-11143893)},
);
}
done_testing();
__END__
`

Test results:

`$ perl test.pl
ok 1 - 9 .. 10 - 1 without constant (OP)
ok 2 - 9 .. 10 - 1 with constant() (OP)
not ok 3 - 9 .. 10 - 1 with constant (OP)
# Failed test '9 .. 10 - 1 with constant (OP)'
# at test.pl line 38.
# Structures begin differing at:
# $got->[1] = '10'
# $expected->[1] = Does not exist
ok 4 - 9 .. 10 - 1 with constant() and parnes (proposed-me)
not ok 5 - 9 .. 10 - 1 with constant and parens (proposed-me)
# Failed test '9 .. 10 - 1 with constant and parens (proposed-me)'
# at test.pl line 60.
# Structures begin differing at:
# $got->[1] = '10'
# $expected->[1] = Does not exist
ok 6 - 9 .. 10 - 1 with constant() (proposed-11143893)
ok 7 - 9 .. 10 - 1 with constant (proposed-11143893)
ok 8 - 9 .. 10 - 1 with constant() and parens (proposed-11143893/me)
ok 9 - 9 .. 10 - 1 with constant and parens (proposed-11143893/me)
ok 10 - 9 .. 10 with constant (OP)
ok 11 - 9 .. 10 with constant (proposed-11143893)
1..11
# Looks like you failed 2 tests of 11.
`

Hope that helps.

Comment onRe: replacing literals with constantsSelectorDownloadCode