Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: assigning system command output to a variable

by Rex(Wrecks) (Curate)
on Sep 02, 2003 at 21:50 UTC ( #288451=note: print w/ replies, xml ) Need Help??


in reply to assigning system command output to a variable

From putting "system" into the search bar at the top of the page:

"The return value is the exit status of the program as returned by the wait() call. To get the actual exit value divide by 256. See also exec. This is NOT what you want to use to capture the output from a command, for that you should use merely backticks or qx//, as described in `STRING`."

From looking up "backticks" I got a whole list of nodes that should put you on the right path.

The reason I explained this is to show how easy it is to get information on this site if you just try :)

"Nothing is sure but death and taxes" I say combine the two and its death to all taxes!


Comment on Re: assigning system command output to a variable

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (11)
As of 2014-07-29 12:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (217 votes), past polls