I will try to explain better.

#main script

...

...  #i am doing something

system ("perl eck.pl $var > file.txt &"); #here i call my other script and i redirect the output into the file.txt. My eck.pl script will run some time but in my master script i need to use the newly added lines (always) from the txt file

I need to read that file always ...i can do that but the problem is that is blocking my main script and i can;t use the new lines in my master script. In a way i am trying to read that file "live" get the lines and use them inside my master script.

Hope you understand what i am trying to say.


In reply to Re^2: Reading a file live! by negativ_m
in thread Reading a file live! by negativ_m

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.