in reply to Cannot acces a remote file

first, see Roger's comments. second, to help debug, change your code so it's in the form:
my $file = "\\172.22.1.73\D:\FromC\FitClass\fooo.LOG"; warn $file; open(REMOTE,'<', $file) or die ("cannot open the remote file '$file': +$!");
Now, take the string from the warn line (let's assume it printed "foo at script.pl line 1234") and try to run start foo from a dos prompt. Does this work? If not, is it because the UNC path is malformed? Note that it could work but your script still doesn't due to permissions issues -- for example if this is being used from a CGI script make sure that the web server (the IIS user account) has permission to read that file.

Replies are listed 'Best First'.
Re^2: Cannot acces a remote file
by chennaiite (Sexton) on Aug 22, 2005 at 10:41 UTC
    Thanks a lot for u all....

    Now I am able to access remote file.....

    The only thing is that,i have to make the server machine to map a particular folder as sharable then only my code works perfectly.....

    Also only after authenticaion my code works.....

    Now i am in the stage of analysing the Win32::NetResources module..... Can anybody suggest me how far this module is helpfull for me...
    If you have anycode using this module please provide it might save my time...
    Thanks in advance......
      The only thing is that,i have to make the server machine to map a particular folder as sharable then only my code works perfectly.

      Wow, you can only access a file that the owner wants you to access? How refreshing for Windows! Honestly, did you think you could just ask any machine for any file anywhere?

      --
      [ e d @ h a l l e y . c c ]