General way to run an exe with errors written to a file

B

bencejohn

Is there a purely Perl way to do the following (i.e., without relying
on a system specific call)?

use strict;
use warnings;
system("foo.exe bar > errs 2>&1");


Thanks
 
B

Ben Morrow

Quoth (e-mail address removed):
Is there a purely Perl way to do the following (i.e., without relying
on a system specific call)?

use strict;
use warnings;
system("foo.exe bar > errs 2>&1");

IPC::Run

Note that what you have above works perfectly well under Unix, which
includes Mac OS X, and WinNT (including 2k/XP/&c.); this may be portable
enough for your purposes.

Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,206
Messages
2,571,069
Members
47,675
Latest member
RollandKna

Latest Threads

Top