in reply to Integrating Perl and C
If you are using a Windows machine and your function is in a DLL, you could also use Win32::API:
use Win32::API (); my $Get_Temperature = Win32::API->new( 'mydll', 'float Get_Temperature()', ); my $isThisHot = Win32::API->new( 'mydll', 'BOOL isThisHot(int)', ); my $temp = $Get_Temperature->Call(); my $hot = $isThisHot->Call($temp);
or
use Win32::API (); Win32::API->Import('mydll', 'float Get_Temperature()'); Win32::API->Import('mydll', 'BOOL isThisHot(int)'); my $temp = Get_Temperature(); my $hot = isThisHot($temp);
|
|---|