Basic HTML version of Foils prepared Sept 20 97

Foil 58 Interfacing Perl with C

From Perl5 and Advanced Perl4 Features Computational Science for Information Age Course CPS616 -- Sept 20 97. by Geoffrey C. Fox,Nancy McCracken,Tom Scavo


One can interface Perl5 code with C using an interface constructor called xsubpp
This manipulates an existing C library and allows it to be accessed through a designated Perl module
Simple datatypes can be handled automatically but user must manipulate complex C datastructures in special xsub code
see PerlXS and PerlXSTUT manual entries
Also PerlCALL and PerlEMBED manual pages describe how to call Perl from C
One can add a Perl Interpreter to your C program, execute a Perl statement such as a pattern match or execute a full Perl subroutine



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Apr 5 1998