Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Running a Command Line from your Program

by IraTarball (Monk)
on Oct 16, 2001 at 22:08 UTC ( #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
Node Status?
node history
Node Type: note [id://119210]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2019-05-21 16:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you enjoy 3D movies?



    Results (136 votes). Check out past polls.

    Notices?
    • (Sep 10, 2018 at 22:53 UTC) Welcome new users!