I am setting up Perl on a new server, Winserver 2008, IIS7.0 Got most everything working fine, but in moving existing code over from another server, it won't work because the new server thinks file references are all from the website root, rather than from the directory the code is executing from.
On the server, the website is located at C:/abc
I have a piece of code in directory C:/abc/def, using this code:
$cat2="data/file.txt"; open (FILE,"$cat2");
It is trying to read file.txt from C:/abc/data, instead of c:/abc/def/data
Why won't it use the addressing relative to where the code is executing? It worked fine on the previous server. Is there some configuration item I missed in IIS or in setting up ActivePerl?
Thanks!!!

In reply to Can't find relative path by jag150s

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.