With proper formatting (<c>...</c> tags for code, <p>...</p> for other paragraphs), your post would have looked like this:

Hi all, I'm not able to collect the data

$data="install app device_path"' $Result=`$data`;

The success output is

c:\Automation>install app device_path <blank> c:\Automation>

Failure output is

c:\Automation>install app device_path <blank> Error: Code 254587 <blank> c:\Automation>

I also tried with STDERR redirecting even that did not work

$Result = `$Data 2>&1`;

Please help me on this thanks in advance

Also, instead of saying "I'm not able to", or "it doesn't work" etc., it's better to describe what exactly is happening, for example that the script does not run because it's producing an error message (if so, which?), or that the install command does not run, or that it does run, but its output goes to the console, etc.

In case the script doesn't run, that could be because your code as shown does not compile (note the superfluous trailing single quote/missing semicolon).  Also, $data and $Data are two different variables in Perl.


In reply to Re: Not able to collect data from `` by almut
in thread Not able to collect data from `` by gvinu4u

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.