in reply to How to get output from a spawned cmd prompt?
I would use the IPC::Run3 CPAN module to do this.
The run3 routine will allow you to capture the STDOUT to a variable that you can then use to check the output
run3($cmd, \$stdin, \$stdout, \$stderr);
In Section
Seekers of Perl Wisdom