#I am using opendir to put all the files in the array @datafiles.
#Then I use foreach to loop over all the files.
foreach $file (@datafiles){
#Here is how I read the file.
OPEN FILE, "+>", $file
#When I print to the terminal nothing happens
print FILE
CLOSE(FILE)
# What am I forgetting?
#What is a better way in perl to read the contents
#of the files and perform a search/replace using regular expressions.
#Is it better to read the entire file or one line at a time.
#By saying "better" I mean which method is less likely to result in some
#kind of mistake. Any opinions are appreciated.
So, in summary I have two questions
1. What am I forgetting when using perl to read in ascii files?
2. Is there a preferred method for performing a search and replace
on a file?
Thanks in advance for any insight.