Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Running perl on NT server

by Anonymous Monk
on Jun 25, 2003 at 15:47 UTC ( #268881=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to run a search script on a NT server. The script works on my local NT workstation when I run it from "/perl/bin". I am using the File::Find module. I now need to run the search on my server searching the "inetpub/wwwroot" directory.
The problem is on the server the "inetpub/wwwroot" is on the F drive. I am trying to run this script to fetch data in this directory:
but get an error where it cant find the directory. Error message:
Can't stat /inetpub/wwwroot: No such file or directory No such file or directory

I am running it using the "use File::Find"
Here are my attempts:
find( &mySubroutine, "inetpub/wwwroot"); find( &mySubroutine, "F://inetpub/wwwroot"); find( &mySubroutine, "F:/inetpub/wwwroot"); find( &mySubroutine, "F:\\inetpub\wwwroot"); find( &mySubroutine, "F:\inetpub\wwwroot"); find( &mySubroutine, "\inetpub\wwwroot");

Replies are listed 'Best First'.
Re: Running perl on NT server
by Rhose (Priest) on Jun 25, 2003 at 15:58 UTC
    Icky Windows backslashes... *Smiles* You need to double blackslash each one.

    You should be able to use either of these:

    find( \&mySubroutine, 'F:\\inetpub\\wwwroot'); find( \&mySubroutine, 'F:/inetpub/wwwroot');
Re: Running perl on NT server
by Grygonos (Chaplain) on Jun 25, 2003 at 16:01 UTC
    as far as I know, the correct way to list the directory is


    you still need to double \ every directory .
    I haven't used File::Find so I can't tell you about your usage of that. Hope this helps some.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://268881]
Approved by gellyfish
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2019-11-19 05:16 GMT
Find Nodes?
    Voting Booth?
    Strict and warnings: which comes first?

    Results (94 votes). Check out past polls.