use warnings; use Inline C => <<'EOC'; #include void foo() { char * string; string = malloc(10 * sizeof(char)); free(string); } EOC foo(); print "All done without error\n";