Perl-Sensitive Sunglasses | |
PerlMonks |
Re: Constants lists in array slicesby kcott (Archbishop) |
on Jul 20, 2018 at 13:03 UTC ( [id://1218901]=note: print w/replies, xml ) | Need Help?? |
G'day Rolf, Some info first:
I first tried a cut-down version of your issue three different ways. All gave the correct slice; only the third had no warning message.
I then looked at these sections of constant: "List constants" and "CAVEATS". The first of those (see the WEEKDAYS example) suggested a fourth way to try; this gave the correct slice and no error:
The second has: "List constants are not inlined unless you are using Perl v5.20 or higher." This perhaps suggests why [X] (and probably [+X]) had problems; although I'm very much guessing here and don't really know what's going on under the hood. — Ken
In Section
Seekers of Perl Wisdom
|
|