Monknom has asked for the wisdom of the Perl Monks concerning the following question:
Sorry for the trouble - I figured out the problem - the homedir and the dirs had a folder in between them... now, how do I delete a post...?
Wise Monks,
I bought a new computer, with Win7 Home Premium installed and then installed the latest ActiveState Perl. Now I'm trying to run a script that used to work on my WinXP box (with an older version of Perl).
It appears that my file existence check (-e) is failing, even though the files exist. Please help!
Searching for answers, I tried setting perl.exe as "Run as administrator" - still fails. I can't seem to locate anything here or on google. Does anyone here have any ideas?
ActiveState x64 v5.14.2.1402
# @dirs = array of child directories # $homedir = root directory where @dirs branches from # $sourcefile = name of the file we're looking for in each directory foreach my $dir (@dirs) { if (!-e "$homedir/$dir/$sourcefile") { print "file is missing: $homedir/$dir/$sourcefile\n"; } }
What I get is a bunch of "file is missing" errors even though when I look at the locations, the required files are there.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: -e check fails on existing files in Win7 - please help
by MidLifeXis (Monsignor) on Feb 08, 2012 at 13:18 UTC | |
|
Re: -e check fails on existing files in Win7 - please help
by ikegami (Patriarch) on Feb 09, 2012 at 04:15 UTC | |
|
Re: -e check fails on existing files in Win7 - please help
by locked_user sundialsvc4 (Abbot) on Feb 08, 2012 at 14:21 UTC |