Monks,

I want to execute (silk test .exe) through my perl script on windows. But its not working...it may be because of space (between file path) or arguments passed..

Currently I have written like this -
system("C:\\Program files\\Borland\\SilkTest\\partner.exe" -q -r "C:\\ +Perfrom_Acce\\Investigate\\Investigate_ACCEPTANCE.t" WelcomePagesOn);
If I execute the same command on dos prompt,it works.
"C:\\Program files\\Borland\\SilkTest\\partner.exe" -q -r "C:\\Perfrom +_Acce\\Investigate\\Investigate_ACCEPTANCE.t" WelcomePagesOn
Its giving me following error -
Bareword found where operator expected at t1.pl line 2, near ""C:\\Per +from_Acce\\Investigate\\Investigate_ACCEPTANCE. " WelcomePagesOn" (Missing operator before WelcomePagesOn?) String found where operator expected at t1.pl line 4, near "system("" (Might be a runaway multi-line "" string starting on line 2) (Missing semicolon on previous line?) Bareword found where operator expected at t1.pl line 4, near "system(" +C" Backslash found where operator expected at t1.pl line 4, near "Borland +\" Backslash found where operator expected at t1.pl line 4, near "SilkTes +t\" String found where operator expected at t1.pl line 4, near "exe" -r "" Bareword found where operator expected at t1.pl line 4, near "" -r "C" (Missing operator before C?) Backslash found where operator expected at t1.pl line 4, near "Perfrom +_Acce\" Backslash found where operator expected at t1.pl line 4, near "Investi +gate\" String found where operator expected at t1.pl line 4, at end of line (Missing semicolon on previous line?) syntax error at t1.pl line 2, near ""C:\\Program files\\Borland\\SilkT +est\\partner.exe" -r " Can't find string terminator '"' anywhere before EOF at t1.pl line 4.
Let me know how to proceed on the same.

In reply to How to execute .exe from perl script by Rijwan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.