On 23/05/2011 15:32, Irfan Sayed wrote:
> From: Rob Dixon<rob.di...@gmx.com>
> Sent: Monday, May 23, 2011 7:55 PM
> 
>> On 23/05/2011 13:02, Irfan Sayed wrote:
>>>
>>> i am using following command to build the solution file using perl
>>>
>>> perl says some error :
>>>
>>> following is the error :
>>>
>>> Bareword found where operator expected at -e line 1, near "qx/C:\\Program 
>>> Files\
>>> \Microsoft Visual Studio .NET 2003\\Common7\\IDE\\devenv /rebuild"
>>> syntax error at -e line 1, near "qx/C:\\Program Files\\Microsoft Visual 
>>> Studio .
>>> NET 2003\\Common7\\IDE\\devenv /rebuild release "
>>> Execution of -e aborted due to compilation errors.
>>>
>>> following is the actual command :
>>>
>>> L:\Console>perl -e qx/"C:\\Program Files\\Microsoft Visual Studio .NET 
>>> 2003\\Com
>>> mon7\\IDE\\devenv /rebuild release abc.sln /useenv"/;
>>>
>>> plz suggest on how to correctly format the command so that perl can execute 
>>> that command
>>>
>>> this is on windows
>>> plz suggest
>> 
>> Hi Irfan.
>> 
>> Try this
>> 
>> perl -e "qx{\"C:\\Program Files (x86)\\Microsoft Visual Studio 
>> 10.0\\Common7\\IDE\\devenv\" /rebuild release RMSDC.sln /useenv}"
>> 
>> (Although I don't understand why you need to execute the command through
>> Perl instead of directly.)
>> 
> 
> my entire build script is in perl and i want this command to be executed in 
> perl
> 
> so please let me know what is the best way to execute this command in perl

I would write it as below.

HTH,

Rob


use strict;
use warnings;

use autodie 'system';

my $devenv = 'C:\Program Files\Microsoft Visual Studio .NET 
2003\Common7\IDE\devenv';

my $status = system($devenv, '/rebuild release abc.sln', '/useenv');



-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to