Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re^3: find & replace a string in perl

by Corion (Patriarch)
on Nov 25, 2010 at 09:29 UTC ( [id://873605]=note: print w/replies, xml ) Need Help??

in reply to Re^2: find & replace a string in perl
in thread find & replace a string in perl

You don't tell us what your input is and what output you get, and how it is different from what you want.

Again, your regular expression still does not do what you may think it does.

$line =~ s/\btest\b/^\#/ig

The right hand side of a regular expression is a simple string.

Log In?

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (2)
As of 2024-04-15 13:01 GMT
Find Nodes?
    Voting Booth?

    No recent polls found