Currently you are just expected to run everything from the current directory. This was never ideal, and is more annoying now that @INC does not include . by default, so you have to run perl -I. ./mathgen.pl instead. It should be replaced with a standard Makefile.PL and a CPAN-style package, using for instance ExtUtils::MakeMaker. Then people can install the program in their standard system directory.