in reply to numeric representation of string

Similar; or same?

If you're matching bodies which are exactly identical, then use a digest algorithm like MD5 or SHA1/SHA256.

If there are some variations allowed (e.g. variations in whitespace) then it might still be possible to use a digest, provided you canonicalize the message body first (e.g. by stripping all whitespace).

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name