Sorry for re-posting... just in case people don't want to click down another level...

Well, I put together some sample code, and OK, it reads a pathname with single slashes, and seems to run it ok, except for a 'Can't spawn "filename-here" No error" after executing the command.

What I was getting at was that, since so many of the docs for Win32 modules have double slashes instead of single slashes, if I were to follow that convention, I'd have to convert back and forth between single and double slashes. An example, taken from from the Win32::AdminMisc FAQ:

Win32::AdminMisc::ComputerAliasAdd( '\\\\Server1', 'fred' );
and another example from the Win32::FileOp page:
Substed 'A:' => ('','Floppy0') Substed 'B:' => undef Substed 'C:' => ('','Harddisk0\Partition1') Substed 'H:' => ('\\\\servername\homes\username','UNC') # set by subst H: \\servername\homes\username Substed 'S:' => ('\\\\servername\servis','LanmanRedirector') # set by net use S: \\servername\servis Substed 'X:' => () # not mapped to anything
You will notice that these, and other cases, have four slashes, not two, at the beginning of a UNC path.

So, basically, I'm worried that somewhere along the line, I'll get the two mixed up. A potential ramification here is that the config file could be written with four slashes and not two for a UNC path. Of course, there are other bugs that could pop up, too...

-- Burvil


In reply to Re: Win32 File tests, pathnames by bowei_99
in thread Win32 File tests, pathnames by bowei_99

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.