$ echo foobar | perl -MDigest::MD5 -nle 'print Digest::MD5::md5($_)' | od -t x1 0000000 38 58 f6 22 30 ac 3c 91 5f 30 0c 66 43 12 c6 3f 0000020 0a 0000021
$ echo foobar | perl -MDigest::MD5 -nle 'print unpack("L",Digest::MD5::md5($_))' 586569784
$ echo foobar | perl -MDigest::MD5 -nle 'print unpack("L",Digest::MD5::md5($_)) % 5' 4
N = 3 408313 0 408764 1 408370 2 N = 4 306157 0 307042 1 305954 2 306294 3 N = 5 244633 0 245089 1 245880 2 244960 3 244885 4 N = 6 204129 0 204480 1 203698 2 204184 3 204284 4 204672 5 N = 10 122542 0 122427 1 122685 2 122694 3 121956 4 122091 5 122662 6 123195 7 122266 8 122929 9