mr_dont has asked for the wisdom of the Perl Monks concerning the following question:
Fellow Monks,
I am stumped by the behaviour of file functions on a windows NT Server I am using. Basically, I can open a file for reading, but I cannot append to a file. I am using the absolute path in my open statement. I have also tried to use the binmode() function, to no avail. Thus my code looks something like:
$somestuff = "This is a new line for my data file"; $filename = "d:/foo/bar/myfile.dat"; open (DATA,">>$filename") || die("Cannot Open Database File"); binmode (DATA); print DATA $somestuff; close DATA;
This code dies and gives me my "Cannot open database file" error
I also tried to use the path d:\\foo\\bar\\myfile.dat
Does anymonk know what is the problem? Is it a permissions issue? Unfortunately, I am not the administrator of this server!
Thanks Monks...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Appending to Files on NT?
by wog (Curate) on Jan 22, 2002 at 04:52 UTC | |
by tye (Sage) on Jan 22, 2002 at 05:08 UTC | |
by mr_dont (Beadle) on Jan 22, 2002 at 05:02 UTC | |
Re: Appending to Files on NT?
by grep (Monsignor) on Jan 22, 2002 at 04:56 UTC | |
Re: Appending to Files on NT?
by Anonymous Monk on Jan 22, 2002 at 16:13 UTC |
Back to
Seekers of Perl Wisdom