scripting in c code example
Example 1: script in c
#!/usr/bin/perl
use Inline C;
exit main0();
__END__
__C__
#include <stdio.h>
int main0()
{
printf("Hello world !\n");
return 0;
}
Example 2: script in c
#!/usr/bin/perl
use Inline C;
$arg = $ARGV[0];
$arg = tr/[a-z]/[A-Z]/; # modification du paramètre
exit main0($arg);
__END__
__C__
#include <stdio.h>
int main0(char *arg1)
{
printf("Hello %s \n",arg1);
return 0;
}