It isn't Perl, but it is a semi-standard Unix utility, has been ported all over the place, and solves exactly this problem. You'll have to create a makefile, but since you're doing C/C++, there is a good chance you already have one.
If you use the -f option, you'll get a nice delimited file Perl would be more than happy to munge for you.