|
|
| "be consistent" | |
| PerlMonks |
Re^4: Search and replace within a fileby muizelaar (Sexton) |
| on May 08, 2012 at 13:19 UTC ( #969454=note: print w/ replies, xml ) | Need Help?? |
|
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||