[Thamesvalley-pm] using third party perl scripts

Ismail, Rafiq (IT) Rafiq.Ismail at MorganStanley.com
Wed Oct 17 03:04:05 PDT 2007

Hi Charlie,

> -----Original Message-----
> From: 
> thamesvalley-pm-bounces+rafiq.ismail=morganstanley.com at pm.org 
> [mailto:thamesvalley-pm-bounces+rafiq.ismail=morganstanley.com
@pm.org] On Behalf Of Greg Matthews
> Sent: 16 October 2007 15:26
> To: ThamesValley Perl Mongers
> Subject: Re: [Thamesvalley-pm] using third party perl scripts
> Charlie Harvey wrote:
> > Hey Greg,
> > 
> > Sounds like you need to use do or eval.
> > 
> > do EXPR
> its not clear from the docs whether you can capture output 
> from "do" (as I do above with the pipe).

Short answer no.  However you can capture the output from STDOUT:

Use FileHandle;
my $stdoutCapture;
open FAKE_OUT, ">", \$stdoutCapture;
select (FAKE_OUT);
do "script";
close FAKE_OUT;
select (STDOUT)

## Examine $stdoutCapture



NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error.

More information about the Thamesvalley-pm mailing list