http://qs321.pair.com?node_id=11132921


in reply to Re^2: Perl 5.34 is released (bad code example)
in thread Perl 5.34 is released

"qr/{,3}/ was always allowed"

Nope.

$ perl -E 'say $]' 5.032001
$ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{1,2}/' 1
$ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /[o]{,2}/' Unescaped left brace in regex is illegal here in regex; marked by <-- +HERE in m/[o]{ <-- HERE ,2}/ at -e line 1.


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^4: Perl 5.34 is released
by LanX (Sage) on May 23, 2021 at 12:41 UTC
    > $str =~ /[o]{,2}/'

    missing the point!

    Already proven in the post you downvoted (line 13)

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

      "the post you downvoted"

      Nope again. (Update for the slow-to-comprehend: I did not downvote the post you linked to.)


      The way forward always starts with a minimal test.
        > again

        Orly?

        So please explain!

        $ perl -Mstrict -wE 'my $str = "foobar"; say 1 if $str =~ /{,3}/; say +$]' 5.028002 $

        (Update perl version added)

        update

        >perl -Mstrict -wE "my $str = 'foobar'; say 1 if $str =~ /{,3}/; say $ +],':',$^O" 5.032001:MSWin32

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery