You can handle the /script.pl/dflskjdfsdkf part with $ENV{PATH_INFO} (if I'm not mistaking). Most pack() & unpack() operations will make it longer (hex 2 for 1, binary 8 for 1). CRC Modules and Compression Modules are listed on CPAN. MD5 is more about encryption (which is pretty usefull too, in this case).
Greetz
Beatnik
... Quidquid perl dictum sit, altum viditur.