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:
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
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
--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]]