in reply to Script Generator

my $perlpath = `which perl`;

Allow my to suggest that instead of this, you might consider...

Replies are listed 'Best First'.
Re: Script Generator
by Brutha (Friar) on Jul 24, 2002 at 12:05 UTC
    BTW, I love the idea.

    My comment on portability:
    As I have to work on a Windows machine, the "$^X" statement is what is working for me, there is no `which` here. Well, here is one now, but that only finds perl.exe not perl.

    The File::Which is working on NT, it includes a pwhich, which would do the job, but then you have a dependence on possibly not installed modules.

Re: Re: Script Generator
by Anonymous Monk on Sep 05, 2002 at 11:29 UTC
    Even more portable: use Config; my $perlpath = $Config{perlpath}; This should work on all platforms without any additional modules since Config is part of the standard distribution.