Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Purpose of the "caret" character in "qr" regex output

by jwkrahn (Abbot)
on Jul 31, 2025 at 01:47 UTC ( [id://11165887]=note: print w/replies, xml ) Need Help??


in reply to Purpose of the "caret" character in "qr" regex output

$ man perlre Starting in Perl 5.14, a "^" (caret or circumflex accent) immediately after the "?" is a shorthand equivalent to "d-imnsx". Any positive flags (except "d") may follow the caret, so (?^x:foo) is equivalent to (?x-imns:foo) The caret tells Perl that this cluster doesn't inherit the flags of any surrounding pattern, but uses the system defaults ("d-imnsx"), modified by any flags specified.
Naked blocks are fun! -- Randal L. Schwartz, Perl hacker

Replies are listed 'Best First'.
Re^2: Purpose of the "caret" character in "qr" regex output
by roho (Bishop) on Jul 31, 2025 at 04:33 UTC
    Thank you jwkrahn.

    "It's not how hard you work, it's how much you get done."

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2025-12-06 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (85 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.