in reply to Perl and Shared drive

This simple example just worked for me on Win98:

#!/usr/bin/perl my @files = `dir \\\\MACHINE\\SHARENAME`; foreach ( @files ) { print; } exit;

Replies are listed 'Best First'.
RE: Re: Perl and Shared drive
by the_slycer (Chaplain) on Nov 06, 2000 at 22:42 UTC
    In my experience the above is the most reliable way to do this.

    $drive = "\\\\servername\\path"

    The quad backslashes being the key point here..
      I tried this too.suppose my servername is nj7001pdcpublic, there is directory SAPTreasTeam. then there is subdorectory under SAPTreasTeam called swift. how would you access this in perl.
        I'm assuming that by "directory" you mean "share". Try this:
        open(F, '//nj7001/pdcpublic/saptreasteam/swift') or die $!; # or open(F, '\\\\nj7001\pdcpublic\saptreasteam\swift') or die $!;
        If you're still having trouble accessing files with paths like this, perhaps you can take advantage of some Win32 modules to help you?