Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: Very curious Problem...

by vinoth.ree (Parson)
on Jan 23, 2013 at 09:09 UTC ( #1014863=note: print w/ replies, xml ) Need Help??


in reply to Very curious Problem...

Is there any safer/simple way to "system"/run a command and get its output into a variable?

Use backtick (``) to run a command and get the output into a variable.

Update:

Adding Additional info.

I always use "qx" which is another form for backticks, which in perl will capture the return from the system call.

OR

Even check for capture and capturex methods in IPC::System::Simple module


Comment on Re: Very curious Problem...
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (16)
As of 2014-07-28 15:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (201 votes), past polls