Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Running a Command Line from your Program

by IraTarball (Monk)
on Oct 16, 2001 at 22:08 UTC ( [id://119210]=note: print w/replies, xml ) Need Help??


in reply to Running a Command Line from your Program

try system or backticks. They block until the called program completes. Backtick (which are ` as opposed to ') return a string of what was sent to STDOUT by the program. Try $bin = `ls /usr/bin`; to test it out.

BTW. $? holds any error if the called program fails.

Ira,

"So... What do all these little arrows mean?"
~unknown

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2024-03-29 06:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found