Re: Running perl from a test on Windows

Gabor Szabo <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <CABe4FJCDgCs-P3vSDK=um79WKt3NFumo0rsRwFd92nVasy0wZg@mail.gmail.com>
On Tue, Jan 15, 2013 at 11:32 AM, Buddy Burden <[email protected]> wrote:
> Gabor,
>
>> I am not sure if this helps but in Windows you need to put the
>> double-quotes around  $cmd
>>
>>     my $output = qx{$^X -e "$cmd"};
>
> Yes, that would work if I were running _only_ on Windows.  But I need
> it work for everything (and the double quotes on Linux will cause any
> variables in my perl code to get intepreted by the shell. :-/

Oh sure, I'd have a conditional based on     $^O eq 'MSWin32'
and two cases.

Gabor
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.