I am trying to get a Perl scripts to access a file over UNC path using specified credentials. Is this possible? If not with P开发者_开发百科erl, what else could I use?
Thanks
-Jesse
Do you have to access many varied paths with differing credentials or just one?
As non-programming solution can you map the network share to a drive letter permananently in Windows before running your perl program?
Check out the module Win32::NetResource it has methods to allow you to connect to Windows network resources, such as drive shares and supply the credentials.
AddConnection(\%NETRESOURCE,$Password,$UserName,$Connection)
Makes a connection to a network resource specified by %NETRESOURCE
精彩评论