hmm. i didnt realize that. Is this in C? how can i convert this into correct syntax?
| [reply] |
| [reply] |
What do you mean cautious about making assumptions? Id rather just use perl unless its difficult to convert.
| [reply] |
Your "program" defines one subroutine. For it to be of any use, you will have to have or to write a program to call the subroutine. If that is in C then you should leave your subroutine definition in C. If it is Perl, then you might write a new subroutine in Perl.
There will be no trivial way to convert the subroutine definition. First you might determine how the arguments will be passed. This will be different because basic Perl data types are different from basic C data types - Perl doesn't have pointers like C does and strings are somewhat different also. Then you can do the same for your return value. Finally, you can write the body of your subroutine. Your sample code is quite simple, so writing an equivalent in Perl should be easy. If it is not obvious, then you probably need to read an introduction to C or to Perl or both.
| [reply] |