[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 wrote:
> 
> 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've always just done

my $version = (qw($Revision: 1.23 $))[1];

I suppose it's not particularly obscure, but a little shorter.

-- 
Rich Bowen <rbowen@rcbowen.com>
Author: Apache Server Unleashed - http://www.apacheunleashed.com/

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