in reply to Unable to open file.
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: >
|
|---|