P is for Practical | |
PerlMonks |
Re: Running a Command Line from your Programby IraTarball (Monk) |
on Oct 16, 2001 at 22:08 UTC ( [id://119210]=note: print w/replies, xml ) | Need Help?? |
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?"
In Section
Seekers of Perl Wisdom
|
|