I lack the knowledge on how to resolve a certain problem, if you could even call it a problem... I am helping a friend of mine with some tasks, and short of making a text file and putting in data there, is there any way for me to return data to his program?

Essentially what I need to happen is my friend calls my script with some args, and based on those args, I will get data and print it to console. But is there a way for me to return the actual data to his programvia scalar/array/hash? Will he need to declare a variable that I can fill with data?

Any insight would be awesome! thanks for reading.

EDIT: To add more to this, and just incase there are any questions about this, my friend has a program (exe) on windows. He is using my script for some added functionality. As it stands right now, I output my data to console and he picks it up from there, no problem. What i want to know is, Are there any other ways for my script to return data to his program so i wouldnt need to print to cmd.


In reply to Returning data to parent program by james28909

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.