istm that this would be a job for configure. Most modern OSes actually use perl5 by default ;)
Attach a file by drag & drop or click to upload