I'm with jethro, if you feel the need to use Pastebin and what-not to get help you appear to be having problems isolating the place where your code is having trouble. In other words, you are more likely to get help if you are more specific with the description of your error.

Before doing anything however, why can't the C code compile on Solaris (I don't have a Solaris VM or machine handy to answer the question for myself)? My thoughts are that if you could get it to compile then you could write an XS module from Perl to just use the functions you need. From a performance standpoint I cannot imagine how this would not be your best choice. Heck, even if the C code breaks it may be better to fix it and then follow the XS route rather than do this in Pure Perl.

Celebrate Intellectual Diversity


In reply to Re: C code translation to Perl by InfiniteSilence
in thread C code translation to Perl by bottch

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.