use strict; use warnings; use Win32::Process qw(); Win32::Process::Create($ProcessObj, "C:\\winnt\\system32\\notepad.exe", "notepad temp.txt > log.txt 2>&1", 0, NORMAL_PRIORITY_CLASS, ".")|| die ErrorReport();