Add a Perl implementation

Likely not well optimized, but that's not the point. I suppose it's meant to compare obvious implementations rather than optimized implementations.