in reply to automating some cvs commands

A few ways to do this. First, the way you're trying to do this. You want to spawn "/bin/sh". And the first thing you want to do is expect a prompt, and then send it "cvs login". Then when that is done, you can send the shell more commands.

Alternately, you can spawn cvs login, and once that is done, you can use chdir (in perl, don't send it anywhere), and then you can just use system to run your import. Note here that I generally like to use the list version of system, not the single string version:

system(qw(cvs import -m), "First configuration", qw(apache/dd ebizad +min start));
although the way you're doing it would work, too. You can also get rid of the backslashes by using different surrounding quotes:
system('cvs import -m "First configuration" apache/dd ebizadmin star +t');
Have you sent a note to the author of the Cvs module to ask about adding the import functionality?

Replies are listed 'Best First'.
Re^2: automating some cvs commands
by Anonymous Monk on Nov 12, 2005 at 18:38 UTC

    Tanktalus,

    Thanks for your reply. I see what to do now. I hadn't sent a note to the author, but will do as you suggest.

    Many thanks,

    js.