in reply to Simplify constant value determination
should do it. No need for eval or substitution here.use constant REVISION => ('$Id: mcdt.pl 2081 2006-08-25 16:16:27Z tomt +e $' =~ /(\d+)/g)[0];
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 |