in reply to not able to read remote file from linux machine

You're assuming -e returns false because the file isn't present. That might not be the case. Change

print STDERR "Error:File not present";

to

die("Can't stat config file \"$INI_FILE_PATH\": $!\n");

The important part is the use of $!.

Replies are listed 'Best First'.
Re^2: not able to read remote file from linux machine
by jwkrahn (Abbot) on Nov 10, 2008 at 09:47 UTC

    Or the OP may need $^E for the extended error code/message.

Re^2: not able to read remote file from linux machine
by Anonymous Monk on Nov 10, 2008 at 10:04 UTC
    with this code it is giving the same error.  die("Can't stat INI file \"$INI_FILE_PATH\": $!\n"); I got following error "Can't stat INI file "//machine_ip/some folder/test.ini": No such file or directory" What I think is problem is because file is on some other machine.
      I think problem is because file is on some other machine.

      Maybe you want to install samba, which would allow you to access Windows files from a Linux box.

      I missed the bit in the OP about the script being run on a unix machine. In unix
      //machine_ip/some folder/test.ini
      means
      /machine_ip/some folder/test.ini
      You'll need to mount the remote file system to access it, or access it through samba.

        What i understand from all the comments is that if my remote file is on Windows client then I need to have samba client running on my machine. But, what if my remote file is on nix box? also let me know do i need to compulsorily have the remote machine username and password. In case it is shared to everyone. Thanks