in reply to Re^2: Newbie doesn't understand Digest::MD5
in thread Newbie doesn't understand Digest::MD5

Yeouch - I didn't spot that error. You're running your code without use strict; and use warnings;, and either of them would have alerted you (and me) to what actually went wrong:

Perl interpreted the @ondoe in your string as an array variable. That array variable isn't used and hence is empty. You need to use single quotes to prevent variable interpolation by Perl.

Also, you should really start using warnings and strict, as they prevent typos from growing into hidden, hard to track down bugs.

Replies are listed 'Best First'.
Re^4: Newbie doesn't understand Digest::MD5
by eltorio (Novice) on Apr 19, 2006 at 12:50 UTC
    Thank you !!!! It works well. My error was double quote in place of simple quotes, starting now i'll always use
    use strict; use warnings;
    because it gives an explicit message.
      Two quick notes since you've described yourself as a newbie.

      Some folks like to omit the "use warnings" in production code since the errors sometimes give up too much information to users who, if they are bad guys, can use it maliciously. But during development and testing it's pretty essential.

      Also, if you are going to be taking input from users, you should seriously consider turning on taint mode with the -T option. It's beyond the scope here to explain how to untaint data. The perlsec document has info about that and a whole lot more.