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 reply to Re^4: Search and replace within a file
by muizelaar
in thread Search and replace within a file
by muizelaar
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |