Coding challenges from https://b2b.renesys.com/challenge_site/ (Perl implementation)