Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^7: Perl 5.34 is released

by jeffenstein (Friar)
on Jun 02, 2021 at 20:55 UTC ( #11133441=note: print w/replies, xml ) Need Help??


in reply to Re^6: Perl 5.34 is released
in thread Perl 5.34 is released

I would guess there's a special case when the brace is the first character in the regex.

$ perl -wE 'say $]; say "Match literal" if "{,3}" =~ m<{,3}> && "x" !~ + m<{,3}>;' 5.030001 Match literal $ perl -wE 'say $]; say "Match space" if " {,3}" =~ m< {,3}> && "x" !~ + m< {,3}>;' Unescaped left brace in regex is illegal here in regex; marked by <-- +HERE in m/ { <-- HERE ,3}/ at -e line 1.

Replies are listed 'Best First'.
Re^8: Perl 5.34 is released
by LanX (Sage) on Jun 03, 2021 at 13:13 UTC
    What's happening is that the space must be repeated.

      $ perl -wE 'say $]; say "Match space" if " " =~ m< {0,3}>' 5.028002 Match space $

    Your error is thrown because {,3} is illegal as quantifier for Perl <5.34

    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://11133441]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (7)
As of 2021-12-01 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    R or B?



    Results (13 votes). Check out past polls.

    Notices?