RE: search and replace problem

2002-07-11 Thread Nikola Janceski
You are only opening the file for read. If you want to change the file you have to write it somewhere. =) -Original Message- From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]] Sent: Thursday, July 11, 2002 10:52 AM To: [EMAIL PROTECTED] Subject: search and replace problem Howdy:

Re: search and replace problem

2002-07-11 Thread Chris Ball
Shaunn == Shaunn Johnson Johnson writes: Shaunn But nothing is happening (that I can see). What am I doing Shaunn wrong? This is a FAQ. Your code seems fine in as far as it goes - it iterates through files, and modifies $_ with a regular expression occasionally. Here's the

Re: search and replace problem

2002-07-11 Thread Jeff 'japhy' Pinyan
On Jul 11, Johnson, Shaunn said: * open each file * search and replace the old pattern to a new pattern (should only be one occurrence) * close file You're not storing the results anywhere. You can't expect Perl to modify the file for you automagically. But nothing is happening (that I can

SOLVED: RE: search and replace problem

2002-07-11 Thread Johnson, Shaunn
--thanks all (chris, jeff, nikola) --jeff: your suggestion worked like elfin magick. thanks! --(note: i had to do this twice ... in the search pattern --i forgot the $ in newpattern ... oops.) --anyways ... -X -Original Message- From: Jeff 'japhy' Pinyan [mailto:[EMAIL PROTECTED]]