[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [FWP] Elegant ways to pick up the RCS revision



On 7 Apr 2001, at 11:40, Abhijit Menon-Sen wrote:

> On 2001-04-06 23:57:55, bernie@fantasyfarm.com wrote:
> > 
> > my $version = (split(/ /, '$Revision: $'))[1] ;
> 
> ($VERSION) = q$Revision: 1.01 $ =~ /(\d+\.\d+)/;

Doesn't quite work [e.g., the revision I'm looking at right now is 
1.14.2].   But that's easy to fix:

($VERSION) = q$Revision: 1.01 $ =~ /(\d+(?:\.\d+)+)/;

  /B\
-- 
Bernie Cosell                     Fantasy Farm Fibers
mailto:bernie@fantasyfarm.com     Pearisburg, VA
    -->  Too many people, too few sheep  <--          

==== Want to unsubscribe from Fun With Perl?  Well, if you insist...
==== Send email to <fwp-request@technofile.org> with message _body_
====   unsubscribe