in reply to Re: Calling a sub-routine in CGI
in thread Calling a sub-routine in CGI

So, you are wanting a web frontend to control some device connected through a serial port. This seems to imply that the machine with the serial port is the same one as running the webserver (it may be that all your software is running on one box).

I would suggest that you are biting off more in one go than you can chew.

I would suggest starting by writing a command line Perl program to drive the X10 stuff. Write this program in a modular fashion with subs for each of the functions.

Next think about your web interface. Design the front end forms and hyperlinks, and prototype how you want it to work.

Now knock up a small CGI app to call your existing program functionality using system or backticks. You should now have a working application!

Finally, rewrite the CGI application to call the code directly.

Hope this helps,

--rW

Replies are listed 'Best First'.
Re: Re: Re: Calling a sub-routine in CGI
by Anonymous Monk on Aug 09, 2002 at 15:28 UTC
    Thanks, I have completed your recommendation previously, but I'm having trouble calling the sub-routines via the CGI script. See code several posts above.

    I guess I will have learn some more CGI before I can proceed, thanks again everyone, you've given me plenty of ideas