I have a perl script which currently lists files to a SPOOLLIB directory on the same server. However we now have a requirement to send the files to a dedicated print server over a windows network.
I have used a
$result = system "net use b: \\\\printserver\\d$ $password /USER:$user
+";
#copy the files
$result= system "net use b: /DELETE";
command to share the directory and then copy files,it works, but this is not really satisfactory for a number of reasons.
Can anyone tell me the best way to achive this in perl?