Yes thanks. I would like to fix it but I have abysmal knowledge of
perl.
There seems little sense in reinventing wheels.
We'd like to help, but you've provided exactly zero useful data to help
us help you. "Convert data files to C program" can mean absolutely
anything (and I'd be a little surprised if you can find some generic
script which will do exactly what you need it to do). "Doesn't work
with Cygwin" is even less useful. Is it running? Is it simply not
producing the output you want? Are you getting an error message? Is it
not finding your input file because of a path problem? I find perl to
be very portable between distributions, so I'd be a more surprised if
the code weren't doing exactly what it was written to do, as opposed to
being written to do something other than what you need it to do.
You'll find that until you can provide well-formed questions, you'll be
reinventing wheels quite a bit.
As for pointing you in the right direction, try
http://www.oreilly.com/catalog/learnperl4/ and
http://www.oreilly.com/catalog/lperlwin/
My estimate is that if you've done any programming in any language,
you'll be able to fix your perl script in a week, if you spend about 25%
of your time on it, or 2-3 days at 100%. You might get lucky, and fix
the problem in an hour or two. Because of the nature of perl code, my
bet is it will take you about the same amount of time to write your
converter from scratch as it will to decipher someone else's code.