Hi,
What it's doing is opening the file for reading, and if the file doesn't
exist it creates it. I uploaded it to my domain and it worked fine there,
so it's something wrong locally.
Here's the code just so you can see what I had:
Open(GAMELOG, "$file");
@entries = <GAMELOG>;
close(GAMELOG);
Thanks for your help.
Adam
On 12/24/04 9:36 AM, "Conrad Schilbe" <[EMAIL PROTECTED]> wrote:
> First thing you should do is get perl to tell you why it can't open the file:
>
> open(FH, "/path/to/file") || die "$!\n";
>
> Most likely it's a permission problem - die "$!\n" will report something like:
> "Permission denied" - You do not have permission to open the file.
> "No such file or directory" - File does not exist or path to file is wrong.
>
> Are you trying to append to a file or write over it or just read it?
>
> To append to a file open it like this:
>
> open(FH, ">> /path/to/file") || die "$!\n";
>
> To overwrite the file:
>
> open(FH, "> /path/to/file") || die "$!\n";
>
> To simply read from the file:
>
> open(FH, "/path/to/file") || die "$!\n";
>
>
> Cheers!
>
> -- cs