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.
  • I tried the naive approach by simply doing

    perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex(""), "\n"'

    which gives me 42675453fde7b6ee681e9c0ded931c00, but this doesn't work. I tried to verify with

    perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex(""), "\n"'

    which gives me 61c2a42ed105748d58b7b2f7ac3cd712, but the article says db1a33946e2a8577b8d3377d0715bf61.

    An encoding issue?! BTW, I'm runnign 5.8.8 on Linux...
    • Nope. It's your @.

      Try instead:

      perl -MDigest::MD5 -e 'print Digest::MD5::md5_hex( q( ), "\n"'

      That one got me too :(

      • Of course! *smacksforehead*

        Thanks! :-)

        So now I hope that my gravatar [] will result in less people contacting me with support issues... ;-)

    • Turn on warnings. :) Yes, even in a one-liner. My fingers are practically hard-wired to type "-wle".
      • Good advice... thanks! :-)

        But I guess you meant "-we" (which is really easy to type), not "-wle"...

        Anyway, now I'm waiting for the positive effect that my gravatar on CPAN [] will have on the support requests... ;-)

        • No, actually the -l gives you a little extra help too, it saves you from having to print "\n".

          So your one-liner could've just been:

          perl -MDigest::MD5 -wle 'print Digest::MD5::md5_hex( q( )'
          • Look ma no quotes :)

            perl -MDigest::MD5 -wle print+Digest::MD5::md5_hex(shift().q( burak

            me too [] btw...