Re: -e fails sometimes
- From: xhoster@xxxxxxxxx
- Date: 31 Mar 2006 22:58:53 GMT
Asterbing <no@xxxxxxxxxx> wrote:
In article <1143835705.181151.202910@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
mritty@xxxxxxxxx says...
Please post a short-but-complete script
that demonstrates the error you're having.
This code, on some stations, on a LAN under Win32, sometimes, display
"C:\TEST\stats\histo.gif not found" even if the file exists on disk in
this path.
#!/usr/bin/perl
use strict;
print "Content-type: text/html\n\n";
my $file = "C:\\TEST\\stats\\histo.gif";
if (! -e $file){ print $file." not found"; }
Print the error message, it might be helpful:
if (! -e $file){ print $file." not found: $!"; }
else { print $file." found"; }
exit 0;
What do you mean by sometimes? If you put this in a loop and executed it
100000 times on the exact same $file, while nothing else is touching that
file, would it sometimes fail and sometimes succeed? Or does the sometimes
that it fails have a different $file than the sometimes that it succeeds?
Are files being added and removed while all of this going on? If so, how
do you know that the file did in fact exist on disk at the exact instance
that -f was executed?
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
.
- Prev by Date: Re: filemaker pro and perl
- Next by Date: How to reuse the FS_ wordlist from Win32API::File?
- Previous by thread: Re: -e fails sometimes
- Next by thread: Re: substition in perl
- Index(es):
Relevant Pages
|
|