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.


In reply to -e check fails on existing files in Win7 - please help by Monknom

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.