Also try the IO::Capture modules.
In reply to Re^2: Redirecting and using output from executed program by DrHyde in thread Redirecting and using output from executed program by Hena