Hello All,
I have written a code "auto_runner.pl" which invokes another script "embed.pl".
embed.pl script in turn opens an xterm and sends messages on this xterm. I want to catch the error thrown in this xterm. Zenity tags are used to highlight error when embed.pl comes across one.
Also that I have no control of changing the code in embed.pl since it is someone's else's code I am using...
Please suggest which direction should I proceed.
Looks clueless to me.

sub CIrc_check{ my %SETUP=%{$_[0]}; print "\033[33m Embed.pl invoked\033[0m\n"; my $link=$SETUP{SVN}; my $output_path=$SETUP{LOCATION_OF_OUTPUT}; my $model_name=$SETUP{MODEL_NAME}; $output_path=$output_path."/"."EMBED_RESULT"; `mkdir $output_path`; chdir $output_path or die "Can't cd to $output_path : $!\n"; `xterm -e embed.pl -link $link &`; #When embed.pl strikes with an error in link or something it evaluated + it throws zenity tag sayin error in model name or so }

In reply to Catching errors from embedded script in parent script by Anonymous Monk

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.