perl script output cannot pipe to file
I have a strange problem. My perl script produces the output when I run from the command line but when I pipe it to a file, it just hangs. ie. no output to the file at all.
Additional info: There is one subroutine which does an ldap lookup, then passes the result via a 'return', then I 'print' the variable. This is all done in a while loop processing a list from a file. Any pointers? Thanks & Regards, |
Hi,
Without the actual code it is a bit hard to guess what could be wrong. One thing that does come to mind: Could it be that you are encountering perl's buffered output? Have a look here: Suffering from Buffering? Hope this helps. |
Thanks Druuna,
Thats a real interesting article about buffering in perl. I ended up using the Code:
$|++; Thanks & Regards |
You're welcome :)
|
All times are GMT -5. The time now is 05:53 AM. |