doran has asked for the wisdom of the Perl Monks concerning the following question:

Is there a simple way of finding (from within a script) the ActivePerl version number (eg. build 630). While $] gives me the actual Perl version, I'm looking for something better than print `perl -v` to find the specific ActivePerl version

Thanks -db

Replies are listed 'Best First'.
Re: Finding the ActivePerl Version
by Albannach (Monsignor) on Nov 21, 2001 at 00:50 UTC
    print Win32::BuildNumber();

    --
    I'd like to be able to assign to an luser

      Thanks! Exactly what I was looking for.
Re: Finding the ActivePerl Version
by patgas (Friar) on Nov 21, 2001 at 00:26 UTC

    *shrug*

    `perl -v` =~ /build (\d+)/; my $build = $1;

    Marginally better than just printing out the entire `perl -v`, I guess.

    "We're experiencing some Godzilla-related turbulence..."

(Ovid) Re: Finding the ActivePerl Version
by Ovid (Cardinal) on Nov 20, 2001 at 23:50 UTC
    my $version = $];

    Update: Ooh... I should have read your post more closely :) After quite a bit of searching, the only solution I could find was the backticks (though this doesn't mean a solution is not available.)

    perl -e "($version) = (`perl -v` =~ /build (\d+)/);print $version"

    Cheers,
    Ovid

    Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.

      Thanks, but as I mention, that gives me the **perl** version (eg. 5.006001). I'm looking for the ActivePerl Build number (eg. 630). Is that stored in some variable someplace?