http://www.perlmonks.org?node_id=1193040


in reply to Re^2: System vs. User module version of List::Util
in thread System vs. User module version of List::Util

And this is just great, for my stuff for the browser, I am stuck with 5.8.8; but on the command line of my web host, I have 5.24.2. That's so not fair! (And not a PM problem.)
This is actually something that you can probably fix.

On the command line, run which perl to get the path to the perl binary that you're using there. Now modify the shebang line at the top of your web script to match (e.g., if which perl says /home/aleena/perlbin/perl, then, in your web script, change #!/usr/bin/perl to #!/home/aleena/perlbin/perl) and your web script should now run in the same version of Perl as you get on the command line, and with the same compile-time settings, including the default value of @INC.

Replies are listed 'Best First'.
Re^4: System vs. User module version of List::Util
by Lady_Aleena (Priest) on Jun 18, 2017 at 09:09 UTC

    Modifying the shebang won't work, since I do not have the same set up as my webhost. So a custom shebang for my webhost would make my scripts (286 of them) fail locally. That is why I have to code for 5.8.8 (web) even though I have 5.22.2 locally and my web host have 5.24.2 at the command line.

    I am so screwed up.

    No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
    Lady Aleena
      "...my scripts (286 of them) fail locally...code for 5.8.8 (web)...have 5.22.2 locally...web host have 5.24.2...I am so screwed up"

      No wonder. Sounds like a terrible setup.

      There is a nice german word: "beratungsresistent". Some translate it with stubborn but this don't really fit.

      Best regards, Karl

      «The Crux of the Biscuit is the Apostrophe»

      Furthermore I consider that Donald Trump must be impeached as soon as possible

        There is a nice german word: "beratungsresistent". Some translate it with stubborn but this don't really fit.

        Translate it literally: resistant (with a slightly medical touch) to consulting. Or, in other words: unable to accept any advice.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)
Re^4: System vs. User module version of List::Util
by Lady_Aleena (Priest) on Jun 20, 2017 at 11:12 UTC

    Addendum:

    which perl returns /usr/local/cpanel/3rdparty/bin/perl.

    I don't have cpanel on my computer, so again, changing the shebang to match that would still make my local copies fail, I think.

    No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
    Lady Aleena

      Find the CPanel perl version (/usr/local/cpanel/3rdparty/bin/perl -v; or, with -V option instead in case to match the version as close as possible) in order to install locally on your system. You do not need CPanel to run the same version of perl & modules.