Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^3: retrieve the value of a system call in a non blocking mode

by flexvault (Monsignor)
on Dec 07, 2013 at 06:39 UTC ( [id://1066108]=note: print w/replies, xml ) Need Help??


in reply to Re^2: retrieve the value of a system call in a non blocking mode
in thread Do not display the command result in the console (updated)

young_monk_love_perl,

    I'm sorry I don't understand...

My answer wasn't to write your code, but to help you learn to program with Perl. If you look up the 'qx' function you will find that it is a way to call the system and have the output returned to your script. If you tried perl -e '$v=qx/ls/;' you would have found that the output of the 'ls' system command did not display on your console. (One of your requirements). I then showed you how to save the results to a text file, and if you tried the code, you would learn that once you had the output of your command, you could use 'split' to create an array or with 'map' to build a hash or, or, or, ...

Others have given you some good examples and ideas, and you should explore their suggestions as well.

If this is a one time requirement, you may want to hire a Perl programmer ( see 'jobs.perl.org'). If this is a career opportunity for you, then this site has lots of information to help you become a better and better Perl programmer.

Hope this helps.

Regards...Ed

"Well done is better than well said." - Benjamin Franklin

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (6)
As of 2024-03-29 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found