mmf has asked for the wisdom of the Perl Monks concerning the following question:

Is there a perl module that parsers out cvs tags or RCS keyword strings similarly to how 'ident' works?

Replies are listed 'Best First'.
Re: revision number
by kyle (Abbot) on Sep 02, 2008 at 16:28 UTC

    It would help to give us an example of what you want to parse, and what you want to get out of it. I suspect that a few lines of Perl would do what you want without the weight of a full module. For example:

    $VERSION = (qw$Revision: 1.1 $)[-1];
Re: revision number
by mmf (Initiate) on Sep 02, 2008 at 17:01 UTC
    I am looking for module to extract the version # from other files or module files without the need to look threw the file i try to parse it out; (there are some odd files).
    open (my $file,'<','file path'); my $Version= ver($file||'file path');

      If all you are trying to do is parse it the same way that ident does, then you don't need to get very fancy, the parser in ident isn't all that intelligent, it just looks for things between the delimiters. I usually just do it from the command line with ack...

      ack -o '\$Revision.*?\$'

      www.jasonkohles.com
      We're not surrounded, we're in a target-rich environment!