http://www.perlmonks.org?node_id=288451


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