Hi all,

I have a script that I'm working on - that thanks to all of you fine people here, works really well for what I'm looking to do. :D

What it does is read the current directory structure, strip out the CVS files and spit out a list to a file. It then reads that file back in, and does a 'cvs co $f' on each line.

The way I'm looping it is as such:

foreach my $f (@state2) { print "File is $f\n"; # swap this with cvs co command `cvs co $f`; }
What I'd like to add to this is to have the loop run a 'cvs log filename.xx' on each file read, checkout the file if it exists in CVS, and spit back a small blurb saying "File: filename.xx does not exist in CVS tree".

If I do a 'cvs log ccrutil.pl' (the script i'm writing) I get the following:
$ cvs log ccrutil.pl RCS file: /home/cvs/d600/ccrtest/ccrutil.pl,v Working file: ccrutil.pl

I say this every time, but it needs mentioning: I'm very, very new at this and 99% of what I know comes google, O'Reilley books and the slew of questions that you guys have been kind enough to help me out with. :)

Any insight is as always very, very much appreciated. Thanks!

In reply to Looking to confirm a file against CVS as part of a loop by Seventh

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.