Run this code, and it dies for no apparent reason (assuming you've installed VisualStudio in the default location). The reason it dies is the rules that system uses for calling out to the shell:my @cmd = "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003 +/Common7/IDE/devenv.exe"; system(@cmd) and die $!;
use subs 'system'; sub system { if ((@_ == 1) && ($_[0] =~ /(\S*)\s/) && (! -x $1) && (-x $_[0])) { $_[0] = "'$_[0]'"; } CORE::system @_; } my @cmd = "/cygdrive/c/Program Files/Microsoft Visual Studio .NET 2003 +/Common7/IDE/devenv.exe"; system(@cmd) and die $!;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: system commands with spaces
by PodMaster (Abbot) on Apr 09, 2004 at 02:40 UTC | |
by dpuu (Chaplain) on Apr 09, 2004 at 16:46 UTC |