Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: assigning system command output to a variable

by Rex(Wrecks) (Curate)
on Sep 02, 2003 at 21:50 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://288451]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-19 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found