FAQ
# New Ticket Created by Daniel Șuteu
# Please include the string: [perl #127801]
# in the subject line of all future correspondence about this issue.
# <URL: https://rt.perl.org/Ticket/Display.html?id=127801 >


Seems like interpolated values for range boundaries are not parsed correctly.

To illustrate the issue, let's consider the following code:

my $width = 5;
my $str = 'abcdefghijklmno';
say ($str ~~ /(. ** 1..$width)+/).values».Str;

The expected output should be:

(abcde fghij klmno)

but currently we get a parse-time error: Malformed Range

Search Discussions

  • Timo Paulssen at Mar 29, 2016 at 5:44 pm
    If you want to use interpolated ranges, you'll have to use {1..$width}.

    However, the error message is clearly wrong and could definitely be
    changed to suggest that change. That's why I changed the title of the
    bug (or at least tried to)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupperl6-compiler @
categoriesperl
postedMar 29, '16 at 2:00p
activeMar 29, '16 at 5:44p
posts2
users2
websiteperl6.org

2 users in discussion

Timo Paulssen: 1 post Daniel Șuteu: 1 post

People

Translate

site design / logo © 2019 Grokbase