in reply to Replacing one string with another string
open(DATA,"file.inf"); #opens file @array = <DATA>; #assigns data to an array close(DATA); #closes the file @array =~ s/Name/Fullname/g; #substitutes Name with Fullname throughou +t the file open(DATA,">file.inf"); #opens file for writing print DATA @array; #prints data to the file close(DATA); #closes the data
- p u n k k i d
"Reality is merely an illusion,
albeit a very persistent one."
-Albert Einstein
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Replacing one string with another string
by maverick (Curate) on Aug 18, 2000 at 06:52 UTC |