in reply to Re: mysql error
in thread mysql error

You are right about different versions of perl:
which perl
/usr/local/bin/perl

Script: #!/usr/bin/perl

If I change the script to: #!/usr/local/bin/perl
It chokes.

Do you know how I can change perl to /usr/bin/perl in debian 8?

Replies are listed 'Best First'.
Re^3: mysql error
by Danny (Chaplain) on Feb 16, 2024 at 19:37 UTC
    It's the order in your $PATH environmental variable:
    echo $PATH
    You can change the order to put /usr/bin/ before /usr/local/bin. Or instead of running the script like
    perl script_name.pl
    just run
    ./script_name.pl
      Thank You!