Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^5: Eugh, regex :(

by haoess (Curate)
on Mar 25, 2009 at 09:58 UTC ( [id://753081]=note: print w/replies, xml ) Need Help??


in reply to Re^4: Eugh, regex :(
in thread Eugh, regex :(

Ah, looks like you've stumbled into a perl parsing trap:

s||$1[/|

This code tries to interpolate the @1 array, the index starts with a slash, parsed as the begin of a matching pattern, but missing the closing slash, that's why you get the Search pattern not terminated error. Escaping the [ with a backslash should make all things fine.

-- Frank

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (3)
As of 2025-11-17 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (72 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.