in reply to Why cant i save output of tasklist.exe in an array?

You could probably make it even simpler with back ticks:
my @cmdout = `tasklist.exe`;