The
Solaris, Perl 5.8 and use 5.005 post reminded me of a question I have. It's really about linking to the Perl executable on Linux and similar systems. I'm not any kind of expert and I'm unsure about the real-life differences on how links ( created with
ln ) to executables are handled. Almost all of my perl scripts begin with this line:
#!/usr/bin/perl -w
but the actual location of the perl executable on most (but not all) my boxes is
/usr/local/bin.
So here's my question: Is it preferred, just okay, or totally horrible if I put a symbolic (rather than hard) link in
/usr/bin which points to
/usr/local/bin/perl ? Is there a reason I can't, or shouldn't make it a symbolic link, rather than a hard link?
I'd like to make sure I have only one "perl" which runs, and it's always the latest version (if I want a specific version, I can call
/usr/local/bin/perl5.6.1 or whatever). Since the current versions install into
/usr/local/bin, I'd like to put a link in
/usr/bin which points to the current version. If it's not obvious, I don't want to go through and edit all my old scripts.
This must be a common task and I want to do it
right. Is there a preferred way to do it? Thanks.