Beefy Boxes and Bandwidth Generously Provided by pair Networks DiBona
"be consistent"
 
PerlMonks  

Re^4: Search and replace within a file

by muizelaar (Sexton)
on May 08, 2012 at 13:19 UTC ( #969454=note: print w/ replies, xml ) Need Help??


in reply to Re^3: Search and replace within a file
in thread Search and replace within a file

Hi

Yes that’s correct $uname is not being replaced. If I remove the $uname and place for example XXXXXXX within the code and also place this into the /etc/hosts file it does replace it. Its only when I use the scalar $uname it doesn’t seem to work.

s/XXXXXXX/$answer1/g;

As suggested I’ll give quotemeta a go and see if that works. Thanks for your help with this anyway


Comment on Re^4: Search and replace within a file
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2013-05-25 00:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best material for plates (tableware) is:









    Results (516 votes), past polls