Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

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?

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

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2020-06-02 02:26 GMT
Find Nodes?
    Voting Booth?
    Do you really want to know if there is extraterrestrial life?

    Results (12 votes). Check out past polls.