I guess a bit off topic as you've gotten some good advice.. but I would recommend that you get out of the habit of using '\' in path names. This is just not necessary and this backslash the backslash stuff can get to be a mess!

In ancient DOS days, the backslash was required. But now with the MS command line, that is no longer true. The \ character is the escape character in string evaluation and it just causes problems. Use the *nix style /, forward slash. Of course remember that when making a path name, put double quotes around the string "$a/$b" otherwise Perl will figure that you are doing division! But in general forego this \ stuff.

#!/usr/bin/perl -w use strict; my $dir1 = 'Z:\My Documents\Workspace'; #you need single quote here my $versionFile = "$dir1\\version.txt"; print "$versionFile\n"; #Z:\My Documents\Workspace\version.txt my $dirA = "Z:/My Documents/Workspace"; #with / "" is no problem my $versionFileA = "$dirA/version.txt"; print "$versionFileA\n"; #Z:/My Documents/Workspace/version.txt
Another tip for working with the command line, wild cards can be used like this: (not for use in a program, but for getting to where you want to go as a human without typing so much(
C:\>cd do* C:\Documents and Settings>

In reply to Re^2: Use of uninitialized value when using regex by Marshall
in thread Use of uninitialized value when using regex by PerlScholar

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.