1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
open(S, '<', $ARGV[0]); print <<EOF #include "curl/curl.h" int test[] = { EOF ; while(<S>) { my @a=split(/ +/); chomp $a[0]; chomp $a[3]; if($a[0] && !$a[3]) { printf("%s,\n", $a[0]); } } print "};\n"; close(S);