in reply to Upgraded perl but cant get to the new version
When you do a command like this:
$ command
Then the system looks at the diretories in you path and executes the first matching one. To see your path do:
$ echo $PATH /bin:/sbin:/usr/bin:/usr/sbin: $
In this case we have 4 dirs in the PATH. The OS will look for 'command' in /bin, then /sbin....etc until it finds an exe called 'command' If there is one in /bin it will never look any further.
You are seeing the result of this behaviour. You will have (prabably a symlink) to 'perl' in /usr/bin so that is the first one found, and the one that gets executed when you ask for perl. If you do '/usr/local/bin/perl' (probable install location) you will get 5.8. Either call 5.8 on the shebang line as shown or replace the symlink in /usr/bin.....
To find all the perls on your system do:
The -u flag to locate updates the DB (may take a minute, background with &, add a daily cron job...) and then we run it to find all the things on the system that match the search string.$ locate -u $ locate bin/perl /usr/bin/perl /usr/local/bin/perl $
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Upgraded perl but cant get to the new version
by barrd (Canon) on Oct 05, 2003 at 14:31 UTC | |
by tachyon (Chancellor) on Oct 05, 2003 at 23:00 UTC |