use Digest::MD5 qw(md5_hex); $DATA = "0a\nThis is a test response\n0\n" ; print md5_hex($DATA), "\n";