my $perlpath = `which perl`;
Allow my to suggest that instead of this, you might consider...
In reply to Re: Script Generator by hossman in thread Script Generator by brianarn