in reply to Re: File opening/creating
in thread File opening/creating
I suppose that's why I should have just used the '-e' function:
if ( -e $filename ) { open FH, "<$filename" or die $!; } else { open FH, ">$filename" or die $!; close FH; open FH, "<$filename" or die $!; }
At least this eliminates the potential for the endless loop.
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File opening/creating
by Abigail-II (Bishop) on Mar 03, 2004 at 23:09 UTC |