RosettaCodeData/Task/Call-a-foreign-language-function/Perl/call-a-foreign-language-function-2.pl
2023-07-01 13:44:08 -04:00

8 lines
170 B
Raku

use Inline C => q{
void c_hello (char *text) {
char *copy = strdup(text);
printf("Hello, %s!\n", copy);
free(copy);
}
};
c_hello 'world';