Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: running command from within perl script

by amir_e_a (Hermit)
on Oct 11, 2010 at 19:47 UTC ( [id://864685]=note: print w/replies, xml ) Need Help??


in reply to running command from within perl script

The simplest way is to use the "system" function.

If you want to capture the output of the program, use backticks:

my $program_output = `programname`;

For a more advanced, but harder to use way to do the same thing, see IPC::Open3.

  • Comment on Re: running command from within perl script

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (3)
As of 2024-04-20 15:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found