Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^3: Perl 5.34 is released

by 1nickt (Abbot)
on May 23, 2021 at 12:36 UTC ( #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 (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

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? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2021-10-18 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (74 votes). Check out past polls.

    Notices?