The integrated perl layer works in the sense, that you can run perl functions within C just like they were C functions.
Due to perl's limited ammount of datatypes compared to C's, there are a two functions for processing perl commands:

int perl_call_subf("commandname", "format string", ...);
char *perl_call_subf_str("commandname", "format string", ...);

perl_call_subf returns an integer, which is the same as the perl command returns
perl_call_subf_str returns a pointer to a string, which is the same as the perl command returns

commands are defined in standard/sbin/ftps.pl and always prefixed with FTP::, e.g. sub FTP::command {}
