Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: How to use system command in perl script?

by wufnik (Friar)
on Jun 17, 2004 at 13:26 UTC ( [id://367609]=note: print w/replies, xml ) Need Help??


in reply to How to use system command in perl script?

imho unless you are explicitly wanting the exit status of gcc, and your prog, better to use backquotes in the following manner, to capture the output:
my $compileresult = `gcc code.cpp`; my $aoutresult = `./a.out`; #... parse aoutresult
...wufnik

-- in the world of the mules there are no rules --

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://367609]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (6)
As of 2024-04-16 18:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found