The 'plaints about "Unrecognized escape(s)" stem from your use of single-quoted (non-interpolated) $doze paths. If you comment out the lines with those, you'll resolve that problem.

Is the name of the log actually supposed to be "file.log" or were you supposed to supply a real filename -- maybe something like water.log or account.log or similar?

Since you haven't told us what's in YOUR $ENV{APPDATA}*1, I'm not inclined to even hazard a guess about the failures in attempts to use whatever those values are, other than to re-iterate para 2.

Update/clarification:
1 Mine, on a Win7 box, contains a long list of dirs. Does \\WaterAccount exist in yours? This code may help:

#!/usr/bin/perl use 5.018; use warnings; my $key; foreach $key (keys(%ENV)) { printf("%-10.10s: $ENV{$key}\n", $key); }

(Also corrected singulars to plural in para 3.)
</UPDATE: >



check Ln42!


In reply to Re: Unable to open file. by ww
in thread Unable to open file. by shain

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.