in reply to Perl Upgrade Issue: Invalid Argument error

Can you run the script from the command line?

Try to run it as

./indexaf.cgi

From the correct directory that contains indexaf.cgi.

This line looks very suspicious to me:

#!/Path/to/New/Perl/Package -T

This does not point to a Perl interpreter. It should maybe look like:

#!/Path/to/New/Perl/Package/bin/perl -T

... or something like that.