For Programmers: Free Programming Magazines  


Home > Archive > PERL Beginners > January 2007 > % System Question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author % System Question
Citlali Guerrero

2007-01-10, 7:00 pm

Hi all :

Does anyone knows how to catch the error standard from a call to system?
I mean something like this:

use strict;
use warnings;

pritn "Calling the second script : \n";

system("perl hi_all.pl")

exit;

if the hi_all.pl script prints something to the STDERR it of course
print it, but I want to save it on a local variable, does anyone knows
how do that?


Cheers

John W. Krahn

2007-01-10, 9:59 pm

Guerrero, Citlali (GE, Corporate, consultant) wrote:
> Hi all :


Hello,

> Does anyone knows how to catch the error standard from a call to system?


perldoc -q stderr


John
--
Perl isn't a toolbox, but a small machine shop where you can special-order
certain sorts of tools at low cost and in short order. -- Larry Wall
Mumia W.

2007-01-11, 4:00 am

On 01/10/2007 04:20 PM, Guerrero, Citlali (GE, Corporate, consultant) wrote:
> Hi all :
>
> Does anyone knows how to catch the error standard from a call to system?
> I mean something like this:
>
> use strict;
> use warnings;
>
> pritn "Calling the second script : \n";
>
> system("perl hi_all.pl")
>
> exit;
>
> if the hi_all.pl script prints something to the STDERR it of course
> print it, but I want to save it on a local variable, does anyone knows
> how do that?
>
>
> Cheers
>
>


Start->Run->"perldoc IPC::Open3"



Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com