Revert "change default of using system perl to env perl if executable; minor code clean up"

This reverts commit 87daf11254bdd0c6c3914735136dacd207a23dfb.