Sounds like you're suffering from buffering: http://perl.plover.com/FAQs/Buffering.html
The only way to solve your problem is to convince the program that it should not buffer its output. Sometimes you'll have a command switch you can hit to force that (particularly if you wrote those programs). If you don't, then you'll need to jump through a bunch of hoops to convince it that it is talking to an interactive terminal, so please don't buffer. Sorry, it is going to be a mess. There may be a module these days that makes it easy, but I don't think so. I would suggest starting down the path by looking at modules like IO::Pty, IO::Tty, and Expect. On Mon, Jul 18, 2011 at 2:38 PM, Greg London <[email protected]> wrote: > I have a script that uses backticks to run commands, capture the output and > append it to a file. Someone requested that the script also output > immediately to the screen. we are having troubles with some commands > hanging, amd we want to know where the hang is. so if we could see the last > output, we would know. > > Is there an easy way to tweak backticks so it still captures the output but > also tees the output to stdout? > > also, the command that is hanging, I set an ALRM that has 'die' as its > callback. but I end up with the backtick command.running as a zombie > process. I have no idea why its doing that. but I dont think I have ever > used ALRM either. > > > _______________________________________________ > Boston-pm mailing list > [email protected] > http://mail.pm.org/mailman/listinfo/boston-pm > _______________________________________________ Boston-pm mailing list [email protected] http://mail.pm.org/mailman/listinfo/boston-pm

