I have a script which passes a line of formatted data in to an application.
I open the connection to the application thus
open (probe,"| nohup nco_p_generic"
|| die "Cant open probe";
the application can take data on the command line using the format
tokenname "value" tokenname "value" etc as long as the line is terminated with
\n\n the line is passed to the application.
I have a test line in the script which prints out using this format but prints to
STDOUT thus...
print STDOUT "tokenname \"value\" tokenname \"value\""
This works fine and lines are printed as they are recieved (The source of the data is a socket server and lines of data are constanlty flowing from a source client)
When I use the line
print probe "tokenname \"value\" tokenname \"value\""
There appears to be some delay or buffering. The whole thing works but I have to recieve multiple lines or wait 2 minutes not sure which is relevant
before the output lines are sent to the applications handle (probe).
Is there some difference between printing to STDOUT and pipes to applications in the way I have done it.
Thanks in advance for any suggestions
Frustrated Non-programmer but trying !!!
Steve Harvey
[sig][/sig]
I open the connection to the application thus
open (probe,"| nohup nco_p_generic"
|| die "Cant open probe";
the application can take data on the command line using the format
tokenname "value" tokenname "value" etc as long as the line is terminated with
\n\n the line is passed to the application.
I have a test line in the script which prints out using this format but prints to
STDOUT thus...
print STDOUT "tokenname \"value\" tokenname \"value\""
This works fine and lines are printed as they are recieved (The source of the data is a socket server and lines of data are constanlty flowing from a source client)
When I use the line
print probe "tokenname \"value\" tokenname \"value\""
There appears to be some delay or buffering. The whole thing works but I have to recieve multiple lines or wait 2 minutes not sure which is relevant
before the output lines are sent to the applications handle (probe).
Is there some difference between printing to STDOUT and pipes to applications in the way I have done it.
Thanks in advance for any suggestions
Frustrated Non-programmer but trying !!!
Steve Harvey
[sig][/sig]