MD5 is one way hashing. process. For each data/string you'll always find a 32 length hex string, and always unique. Using Perl, below is the way to generate md5 string.
use Digest::MD5 qw(md5_hex);
my $md5_data = "test";
my $md5_hash = md5_hex( $md5_data );
You'll get totally different for almost same string, though it is slightly different. For example your are doing md5 over "string md5 one 1" and "string md5 one 0". Just check difference is 0 and 1, but the md5 will be totally different and you can't guess any pattern. Check the example yourself using above example by changing the value of $md5_data.
MD5 is widely using for session tracking from web servers and many more processes. If you are interested to read more about md5 mechanism read from wiki http://en.wikipedia.org/wiki/MD5
If you are interested to more Perl with md5, then refer to this Perl module which I used at example http://search.cpan.org/~delta/Digest-Perl-MD5-1.6/lib/Digest/Perl/MD5.pm
For more Perl related article from my blog http://icfun.blogspot.com/search/label/perl