#!/usr/bin/perl use Inline C => DATA => LIBS => '-lservices'; # Here's how we would configure Inline if our headers and # libraries are in a non-standard location #use Inline C => DATA => # INC => '-I/usr/local/include' => # LIBS => '-L/usr/local/lib -lservices'; my_services(); __END__ __C__ #include int my_services( ) { struct serv *serv_list = serv_load(NULL); struct serv *serv = serv_list; for (; serv; serv = serv->next) { printf("%s %s %s \n", serv->name, serv->port, serv->proto ); } serv_destroy(serv_list); return 1; }