Philippe M. Chiasson wrote in perl.inline:
>
> On Wed, Dec 12, 2001 at 11:11:39AM +0100, Rafael Garcia-Suarez wrote:
> >
> > The problem with $Config{perlpath} will be fixed in perl 5.8.0, but
> > for older perls, I suggest to fall back to $^X.
>
> This problem got me in the past, and you should know that relying on
> $^X can potentially be problematic in environnement where perl is
> built in another executable; for example, mod_perl. In that case, $^X
> would point to something like /usr/sbin/httpd, wich once used
> might not yield the expected results...
True (unfortunately).
To be sure, you can test if $^X =~ /\bperl/.
> Apparently, before this problem was fixed (pre perl-5.8.0), the only
> 'reliable' place to find the path to the perl interpreter is to look at
> $Config{'startperl'}
I don't think this is really portable. But $Config{'startperl'} will
probably be usable if it begins with '#!'.