Use the Map function in the Win32::FileOp module.
In reply to Re: Logging onto and mapping a share in windows by tokpela in thread Logging onto and mapping a share in windows by davido