in reply to File opening/creating
my $filename = "testfile.txt"; { open FH, "<$filename" or ( open FH, ">$filename" and close FH and redo ) or die "Bleah!\n$!"; }
There's more than one way to do it. ;)
Dave
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: File opening/creating
by Abigail-II (Bishop) on Mar 03, 2004 at 22:34 UTC | |
by davido (Cardinal) on Mar 03, 2004 at 22:55 UTC | |
by Abigail-II (Bishop) on Mar 03, 2004 at 23:09 UTC | |
|
Re: Re: File opening/creating
by kokoko12000 (Novice) on Mar 03, 2004 at 22:35 UTC |