This only checks PATH variable?
Can I “override” path by using say PERL=/usr/somelocal/perl
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Three ways to use a different Perl binary:
PATHenvironment variable before executing the script; e.g.PATH=/opt/alternative-perl/bin:$PATH /path/to/your/script.pl/opt/alternative-perl/bin/perl /path/to/your/script.pl$PATHcontains a directory before the one the “bad” Perl binary is located in then you could place a symbolic link to the “good” Perl binary in such a directory. However, this is messy and only applicable in certain situations, but it is a more permanent solution than the first two.And if you do have write access to that script and you’re willing to modify it then @krishnang’s reply applies: modify the first line to point to the binary to use, e.g.
#!/opt/alternative-perl/bin/perl.