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

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



Bernie Cosell [bernie@fantasyfarm.com] said:
> I thought I saw [maybe on c.l.p.misc] a fairly cute/clever way to pick up 
> the RCS revision number...   I can't remember what it was, so I thought 
> I'd ask here.  what I use [as is typical for my code] is dull and 
> straightforward:
> 
> my $version = (split(/ /, '$Revision: $'))[1] ;
> 
> but surely there must be more fun/obscure ways to get that effect..:o)

I use:

  $VERSION = substr(q$Revision: 1.14 $, 10, -1);

I recall seeing something similar somewhere, but I can't recall where.

--paulv

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