in reply to Two Versions of Perl......
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Two Versions of Perl... (updated)
by Anonymous Monk on May 07, 2017 at 16:39 UTC | |
by haukex (Archbishop) on May 07, 2017 at 16:56 UTC | |
by Anonymous Monk on May 07, 2017 at 17:35 UTC | |
by haukex (Archbishop) on May 07, 2017 at 18:28 UTC | |
by TexanScot (Initiate) on May 07, 2017 at 18:55 UTC | |
|
Re^2: Two Versions of Perl... (updated)
by Anonymous Monk on May 07, 2017 at 16:11 UTC |