Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: system() and qx comparison

by ikegami (Pope)
on Sep 27, 2011 at 23:25 UTC ( #928203=note: print w/replies, xml ) Need Help??


in reply to system() and qx comparison

IPC::System::Simple provides capture and capturex which are single- and multi-arg versions of qw respectively.

use IPC::System::Simple qw( capture capturex ); my $foo = capture("shell command"); my $foo = capturex("program"); my $foo = capturex("program", @args);

Conveniently, they even do the error checking for you.

By the way, IPC::System::Simple can also add error checking to system.

use IPC::System::Simple qw( system systemx ); system("shell command"); systemx("program"); systemx("program", @args);

Replies are listed 'Best First'.
Re^2: system() and qx comparison
by didess (Sexton) on Sep 28, 2011 at 05:43 UTC
    Thank you a lot. It really seems to be what I was looking for !!!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928203]
help
Chatterbox?
[pryrt]: Sorry, my bad: it was't done downloading when I did the sha1sum... now I match your 309ad... value
[stevieb]: I'll see how to get in touch with someone and advise that there's an issue. Thanks for helping me confiirm pryrt!
[pryrt]: 5.14.2.1-32 also mismatches; but 5.24.1.1-64 matches their sha1

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (9)
As of 2017-03-29 21:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (353 votes). Check out past polls.