in reply to curious behavior: why does it do this?

See the docs:

The range operator (in list context) makes use of the magical auto-increment algorithm if the operands are strings. ... If the final value specified is not in the sequence that the magical increment would produce, the sequence goes until the next value would be longer than the final value specified.

The magic string increment would normally produce the sequence "0", "1", "2", ... "98", "99", "100", "101", ..., and "-1" is not in that sequence.

Update 2019-08-27: See this node, which documents the behavior, as well as the change in the behavior as of Perl v5.32.

Replies are listed 'Best First'.
Re^2: curious behavior: why does it do this?
by perl-diddler (Chaplain) on Nov 28, 2018 at 01:26 UTC

    Hmmm....When I tried 000 as a starting value, I got an empty array.
    Someone else started w/"1", and also saw no output.
    Weird.