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

Re^2: Find and Replace with special characters

by wrog (Friar)
on May 07, 2015 at 08:59 UTC ( [id://1125974]=note: print w/replies, xml ) Need Help??


in reply to Re: Find and Replace with special characters
in thread Find and Replace with special characters

You also want to make up your mind on whether @lines is being modified in place. If so, then you don't need @newlines at all and it's just
s/#(?=<-\(0N<-\(s3T)/*/g foreach ( @lines );
Otherwise, if you need to keep both versions around, then it's
@newlines = map { s/#(?=<-\(0N<-\(s3T)/*/gr } @lines;
(it being somewhat more efficient to allocate @newlines in one swell foop).

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (11)
As of 2024-04-23 08:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found