Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^3: Perl 5.34 is released

by 1nickt (Canon)
on May 23, 2021 at 12:36 UTC ( [id://11132921]=note: print w/replies, xml ) Need Help??


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 (Saint) 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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11132921]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-25 15:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found