Slash Boxes
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.
More | Login | Reply
Loading... please wait.
  • by jmcnamara (659) on 2002.08.18 17:38 (#11913) Homepage Journal
    He suggested MD5 for the checksum algorithm; but I'm hesitant about using it, since that would mean making HTML-Tree have a dependency on the MD5 module.

    Why not use the unpack() checksum: $sum = unpack "%32C*", $string;

    • Because it doesn't catch transposition:

      DB<1> sub csum { unpack "%32C*", $_[0] }

      DB<2> x csum "+abc-"
      0 382
      DB<3> x csum "-abc+"
      0 382