in reply to Re^8: IPC::Open3 woes
in thread Re^4: IPC::Open3 woes

So, why don't you just do that? Where exactly are you having problems? You can read from the file handles line by line and output each line as you've read it.

Replies are listed 'Best First'.
Re^10: IPC::Open3 woes
by ajayguptab (Initiate) on May 25, 2010 at 09:53 UTC

    The customer does not want to wait until the script executes on all the 4 million lines. He expects something to be logged after each line in the input file is processed.

      So, give the customer what he wants.

      This is not a code writing service. We are here to help people with their problems in Perl. We will not do your work for you. We expect you to show some effort and we also expect you to solve your problems yourself.

      You will need to restructure your loop a small bit, but I've already shown you what you need to change. If you are not up to this task, you will need to either hire somebody who is up to the task or you will need to tell your customer to hire somebody else who knows how to restructure the loop so that it pleases your customer.

        Thanks Corion.

      The customer does not want to wait

      I can safely say: if you're giving the customer a log line for every single one of 4 million lines of input, he's going to have to wait a lot longer. Because logging slows down an app enormously.

        Yes. But it takes lot of time for the script to finish and I am not sure if my script hung at any point without the logging. It would be better if I am able to debug after each line. I am just trying to find a better way