Hi,

I am using Rcs version control in my code.
I am doing check out operation for building version based filter.
User will select particular version from my dropdown menu .
Based on user selected version,I will use checkout "co" command in my code internally,to retrive the file based on version selected by user,i use

my version="1.4"; my $rcs = Rcs->new; $rcs->co('-r $version'); or $rcs->co('-r$version');
But i am getting error as
co: /auto/data/Test/TestCase/public/TC11544.xml,v: improper revision n +umber: $version
but when i give
$rcs->co('-r1.4');
i am getting expected output.Returning 1 as output ie success operation.
But i need to pass as $version only.
$version depends on user selection from drop down menu.
so i need to pass as $rcs->co('-r $version'); only.
I also tried following methods but its not working.
my $verfile=`co -r$version`; $rcs->co("-r" => "$version"); my $verfile=`co -r $version`;
But i am getting error as
co: /auto/data/Test/TestCase/public/TC11544.xml,v: improper revision n +umber: $version
or as
co: RCS/1.4,v: No such file or directory
Could Some one help me in this regard. What i need to modify to get my code to work. Thanks,
Srins.

20060802 Janitored by Corion: Removed PRE tags, added formatting, code tags, as per Writeup Formatting Tips


In reply to How to correct my error in my code which uses Rcs.pm by srins

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.