in reply to need both from system-call
my $return_code = system("system_command > /tmp/program.out"); open(FILE,"/tmp/program.out") || die "Cant open /tmp/program.out $!\n" +; my @output_file = <FILE>; close FILE; unlink("/tmp/program.out"); print STDOUT "return code ",$return_code>>8,"\n"; print STDOUT "@output_file";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: need both from system-call
by rob_au (Abbot) on Apr 27, 2001 at 19:45 UTC | |
by tomhukins (Curate) on Jun 01, 2001 at 12:46 UTC |