in reply to package for directory naming on NT systems?

You have two problems:
  1. You are using strict without declaring your variables ($dir1). Put a 'my $dir1;' someplace that makes sense so that Perl knows what your variable is. See perldiag for more details about this message
  2. You are using backslashes in double-quotes, which will be interpolated. Either use single-quotes or escape your backslashes by doubling them: 'e:\whatever\whatever' See qq/q in perlop for details about how this works.

Replies are listed 'Best First'.
Re: Re: package for directory naming on NT systems?
by chipmunk (Parson) on Dec 22, 2000 at 00:57 UTC
    Or use forward slashes. Paths with forward slashes work just fine in Perl on Windows.

    Update: I had written "forward quotes" when I meant to write "forward slashes".

      ...until you pass the file name to an external program and that program was written by Microsoft. Though I like to use regular slashes in Perl under NT and only rarely run into problems. A quick s#/#\\#g before calling any external program is all that is required.

              - tye (but my friends call me "Tye")
      Update: chipmunk fixed his post, so this is largely a useless followup.

      By 'forward quotes' are you talking about back-ticks (qx//)? I thought these interpolated just like qq// would..? I mentioned single-quotes, but I'm kind of confused as to how you could use this to build a pathname in a string.