Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Good morning Monks, I am trying to write up a short test program to learn how to deal with files in Perl before I try and implement it into a program I have already written. The idea of the test program is to open a file for appending and if the file does not exist create it and open it. The software in the end will be used to create a log in another program to help me track down an error that is occurring around once every 40-50 days. What I have at the moment is just trying to open a file for appending/create the file, and then close the file before testing that it exists. This is all based on the IO:File Lib. The function $fh->open(">> test2.txt") always seams to return true even if the files does not exist and it does not create it either.
In reply to Check if a file exists and if not create it by Wroof
|
|