techman2006 has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use system command from a Perl script which get invoked from another program. During the execution I get error as below

Can't spawn "cmd.exe": No error at <Program>

When I run it from the cmd.exe the Perl script works fine and system command works as expected. So it seems that system command is not able to read ComSpec environment variable which has the cmd.exe path. So how I can tell system command for this environment variable.

I will update the question with sample code shortly.