Careful - there is no such thing as "a reduced-length unique string that uniquely represents the original". Unless you're talking about lossless compression, when you reduce the length of the string (i.e. "hash it"), you lose information, and there is always a small but real chance of collisions. So replace the two instances of "unique" in your sentence with "almost unique", and then your question has an answer.
It sounds to me like you are looking for Digest and one of the many algorithms such as MD5, SHA-1, SHA-256, SHA-512, etc. - Digest::MD5 and Digest::SHA are in the core. If you want a shorter checksum with a larger chance of collisions, there are also algorithms like CRC32 with corresponding modules on the CPAN.