Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The issue is in the last two lines (6 and 7). Line 4 starts up the program beautifully by itself, as expected. Line 5 prints out what I think system() should be sending to the command line. And line 6 returns this error: 'C:\Program' is not recognized as an internal or external command, operable program or batch file. Which of course has me baffled because I have not altered the path to $proggie in any way, I just added a switch with quotation marks. Line 7 returns the same error (It is what line 5 prints out, enclosed in backticks), but if I cut and paste the contents of line 7 (Ignoring the backticks of course) into the command line directly, it works beautifully. What the heck is going on? Is this a bug, or am I missing something? Ivarmy $proggie = '"C:\Program Files\Microsoft eMbedded Tools\Common\EVC\B +in\EVC.EXE"'; my $switch = ' /MAKE "Project - Win32 Debug"'; print $proggie . "\n"; system $proggie; print $proggie . $switch . "\n"; system $proggie . $switch; '"C:\Program Files\Microsoft eMbedded Tools\Common\EVC\Bin\EVC.EXE" /M +AKE "Project - Win32 Debug"';
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(bbfu) Re: Win32 System() Weirdness
by bbfu (Curate) on Aug 16, 2001 at 06:42 UTC | |
|
Re: Win32 System() Weirdness
by John M. Dlugosz (Monsignor) on Aug 16, 2001 at 08:19 UTC | |
|
Re: Win32 System() Weirdness
by Anonymous Monk on Aug 16, 2001 at 21:14 UTC |