Perl implementation for SPORE