Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Reading the algorithm made me go back and modify it to find all common substrings. Takes a *lot* longer to run, but for me is more useful.

    I'm doing some preliminary work with Beowulf in Old English to see if there might be anything interesting to do with such information. With that, I need to look at all possible common substrings between pairs of lines, not just the longest.

    Since I don't know enough XS to handle creating arrays in C, I did it all in Perl :/ Only takes 40-50 times longer, but I have all night to run the program.
    • Creating arrays in C is easy:
      AV * foo = newAV();
      av_push(foo, newSVpv(thestring, 0));
      You can just return the AV * and the builtin perl typemap will turn it into a list for you.