How do i us a c program with my perl script?
Posted on 2003-12-05
Simply - i have a perl script wrapper which invokes my c program. This c program is dedsigned to calculate positions of stars in the sky.
I am currently reading in masses of data from a file to test my program but now i want it to be run on a web server and instead of my perl script giving out the data to a data file (which is read in by the c program), i was hoping to have it completely automated.
I have seen a few examples of programs where they import data through stdin and then exports via stdout. But how do i do this?!!?
Currently each line of my file has 6 properties of the star (including position) which is read into a linked list (as the file size can vary due to an uncertain number of stars). But i dont want to use a file pointer as i mentioned, but have this automated.
I would post my code but its mahoosive!!!