use Win32::Process; Win32::Process::Create($ProcessObj, 'c:\winnt\system32\cmd.exe', "/c echo foo>foo.txt", 0, NORMAL_PRIORITY_CLASS,".")||warn "could not create process";