Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: find & replace a string in perl

by Corion (Patriarch)
on Nov 25, 2010 at 09:29 UTC ( #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?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (1)
As of 2022-08-09 23:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?