Approaches to Web Development for Bioinformatics

Previous  Contents  Next
References

Invoking C Programs from Perl CGI Scripts

Perl can be a good choice to wrap a web user interface around utilities written in C or C++. Invocation of C / C++ programs from Perl using the system command was discussed in the section Interfacing C and C++ with Perl.  A CGI program to invoke the C hello world program in the section C and C++ is


#!/usr/bin/perl

print "Content-type: text/html\n\n";
print "Invoking hello!\n";
system "./hello";

In order to run this you will first need to place the compiled executable file in the cgi-bin directory or equivalent.


Previous  Contents  Next
References

Contributed Comments and NotesAdd a comment.

There are no user comments.

Google

Please send ideas and opinions by email at alexamies@gmail.com.

© 2006-2007 Alex Amies