oh no, not a perl question.

Nic Gibson nicg at noslogan.org
Thu Aug 30 13:30:02 BST 2007


Afternoon

I've got one of those perl questions...

I'm putting together a bunch of scripts that do 'stuff'. This stuff
involves running
other scripts and  executables. I need to capture three things from
the externals
that I'm running - standard input, standard output and exit status.

I don't seem to be able to find a sane way to get all three.

open3 doesn't give me a sensible way to get the child's exit status as
far as I can tell. backticks involve a lot of escaping of arguments and
redirections that I'm not 100% certain of. system spawns a shell if I
need redirections and then I get the shell exit status as far as I can tell.

Is there a sane way to do this and capture all the info I need? I've blundered
 around CPAN for a while but not found anything useful (this may be due to
my blundering rather than anything else).

Oh, and right now it runs on a Unix box or a Mac but but it may need to
become portable to windows in future.

Heyulp?

nic
-- 
Nic Gibson
Director, Corbas Consulting
Editorial and Technical Consultancy
http://www.corbas.co.uk/


More information about the london.pm mailing list