use strict; use Win32::Lanman; my $result = Win32::Lanman::NetUseAdd({ remote => "\\\\yourserver\\ipc\$", password => "yourpass", username => "youruser", domain => "yourdomain", asg_type => &USE_IPC }); if (! $result) { print "Sorry, something went wrong; error: "; print Win32::Lanman::GetLastError(); exit 1; } #test for file existence if (-e "\\\\yourserver\\c\$\\winnt\\system32\\myfile.dll") { print "File exists\n"; } else { print "File does not exist\n"; }