If this "get_iplayer" app is the one I found here, then it starts with #!/usr/bin/env perl, which means it will be run with whatever Perl comes first in the PATH environment variable. You could show us this variable by running the command echo $PATH in your terminal, and posting it here inside <code> tags. Most likely, this second version of Perl installed in /opt/dvr/bin comes first in PATH.

There are several ways to approach fixing this, such as fiddling with PATH variable. However, that can get complicated quickly*. So here's the quick fix: since this app appears to contain only two Perl scripts, get_iplayer and get_iplayer.cgi, you could change the first line of both files from "#!/usr/bin/env perl" to "#!/usr/bin/perl" (I think that's the system Perl on OS X). Of course you'd have to make this change every time you updated the app, but depending on how often that happens, this might still be easier than changing the environment variables.

* Update: For example, I ask myself whether whichever program(s) that installed the Perl at /opt/dvr/bin would break if you simply rearranged your PATH entries. Also, it's possible to change PATH temporarily when the get_iplayer scripts get run via a small wrapper script. But whether that would be "easier" than my suggestion above depends on how much experience with shell scripting on OS X you have.

Update 2: If my fix above doesn't work, then that might mean that your script is being run in a way that disregards the shebang line, which is also a possibility. In that case some further investigation would be necessary, since it might be possible to make the change at the point where perl get_iplayer is invoked. Or, you'd have to see about fixing your PATH.


In reply to Re: Two Versions of Perl... (updated) by haukex
in thread Two Versions of Perl...... by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.