J
Jeff
Hi all
I don't usually follow these groups so replies to my email
(jeffcrow(AT)tpg.com.au) would be preferred in addition to posts to the
group. Thanks.
I am having problems reading a file from a perl script running under
windows98se. This seems to be a recent problem as I've had several scripts
in the past work fine. The general flow of data is;
Data in a spreadsheet in OpenOffice.org 1.1 is output as text file to a dir.
A perl script is kicked off to read all files in the dir and process the
data for output as webpages. I was trying to read files in a dir in a
scalar context but when I was having problems I changed to an array context.
A snip of code is now;
opendir(OUTDOOR, "${autodir}") || die "Can't open the dir ${autodir}";
@files = readdir(OUTDOOR);
closedir(OUTDOOR);
foreach $file (@files) {
TEST READABLE
IF !READABLE
CHANGE MODE TO READABLE OR DIE WITH ERROR MESSAGE
}
What I get as output is 'File is not readable and permissions can't be
changed'. I have checked the directories in the path (\auto\process0) to
ensure they are visible and readable. I have checked the files in the dir
are visible and readable. I have opened the files in a text editor and they
are readable and plain text. I have opened a console/MS-DOS Prompt window
and opened the file with "edit test.out" and viewed the contents fine.
I wrote a perl script that creates some file in the directory and puts some
text into the file. I then close the file, sleep for 30 seconds and then
readdir(directory) and again the files are reported as NOT readable and
permissions can't be changed. Again, the file I output is fine and readable
in consoles, editors etc.
I deleted the version of perl I was using (Activestate 5.?? I can't recall)
cleaned the REGISTRY and installed a GNU perl 5.004_02 and still the same
problem.
Short of running this under LINUX as I would ordinarily do, can any win32
Perl guru offer any assistance?
Thanks in advance for any and all for assistance provided.
Jeff
I don't usually follow these groups so replies to my email
(jeffcrow(AT)tpg.com.au) would be preferred in addition to posts to the
group. Thanks.
I am having problems reading a file from a perl script running under
windows98se. This seems to be a recent problem as I've had several scripts
in the past work fine. The general flow of data is;
Data in a spreadsheet in OpenOffice.org 1.1 is output as text file to a dir.
A perl script is kicked off to read all files in the dir and process the
data for output as webpages. I was trying to read files in a dir in a
scalar context but when I was having problems I changed to an array context.
A snip of code is now;
opendir(OUTDOOR, "${autodir}") || die "Can't open the dir ${autodir}";
@files = readdir(OUTDOOR);
closedir(OUTDOOR);
foreach $file (@files) {
TEST READABLE
IF !READABLE
CHANGE MODE TO READABLE OR DIE WITH ERROR MESSAGE
}
What I get as output is 'File is not readable and permissions can't be
changed'. I have checked the directories in the path (\auto\process0) to
ensure they are visible and readable. I have checked the files in the dir
are visible and readable. I have opened the files in a text editor and they
are readable and plain text. I have opened a console/MS-DOS Prompt window
and opened the file with "edit test.out" and viewed the contents fine.
I wrote a perl script that creates some file in the directory and puts some
text into the file. I then close the file, sleep for 30 seconds and then
readdir(directory) and again the files are reported as NOT readable and
permissions can't be changed. Again, the file I output is fine and readable
in consoles, editors etc.
I deleted the version of perl I was using (Activestate 5.?? I can't recall)
cleaned the REGISTRY and installed a GNU perl 5.004_02 and still the same
problem.
Short of running this under LINUX as I would ordinarily do, can any win32
Perl guru offer any assistance?
Thanks in advance for any and all for assistance provided.
Jeff