Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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


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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-24 11:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found