in reply to Re: Checksum Help Again
in thread Checksum Help Again

hmm. i didnt realize that. Is this in C? how can i convert this into correct syntax?

Replies are listed 'Best First'.
Re^3: Checksum Help Again
by Joost (Canon) on Jul 07, 2009 at 23:50 UTC
      What do you mean cautious about making assumptions? Id rather just use perl unless its difficult to convert.
Re^3: Checksum Help Again
by ig (Vicar) on Jul 08, 2009 at 00:21 UTC

    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.