in reply to perl to ansi C

You could get Inline and convert the script to CPR. That is mostly ANSI C...

/duck