in reply to Simplify constant value determination

Since you seem to just want the first group of digits:
use constant REVISION => ('$Id: mcdt.pl 2081 2006-08-25 16:16:27Z tomt +e $' =~ /(\d+)/g)[0];
should do it. No need for eval or substitution here.

Update: grr, I don't use g-less m// in list context often enough to remember what it returns.

use constant REVISION => '$Id: mcdt.pl 2081 2006-08-25 16:16:27Z tomte + $' =~ /(\d+)/;

Replies are listed 'Best First'.
Re^2: Simplify constant value determination
by Tomte (Priest) on Aug 25, 2006 at 16:52 UTC

    the last one is what i was looking for - thanks and ++ysth - the wood for the trees etc. :)

    regards,
    tomte


    An intellectual is someone whose mind watches itself.
    -- Albert Camus