Tom_Slick_Adv has asked for the wisdom of the Perl Monks concerning the following question:
New to Perl and just asking a simple question.
I am working in DOS and I have an enviroment variable that is named FILE_DIR_PATH this variable is the name of the path where the files I am looking for is located.
I have a text document that contains a series of directories that come from another system. What I want to do is a find and replace.
Basically I want to find this string /xxx/yyy/zzz in file.txt and replace it with FILE_DIR_PATH.
I know how to open the file however the slashes (/) I am having trouble replacing. What do I need to do in order to remove the directory in file.txt and replace it with FILE_DIR_PATH.
Thank you in advance,
Tom Slick Advanced
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Replacing a string in a file
by hardburn (Abbot) on Sep 03, 2003 at 16:54 UTC | |
by edan (Curate) on Sep 04, 2003 at 10:51 UTC |