Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

'System' looking inside files

Status
Not open for further replies.

Meatsim

Programmer
Oct 9, 2001
13
US
Hello all, I have yet another problem! (Yay.) This time I have a problem with getting the System command to work with info in an external data file.

The code snippet I'm dealing with looks a bit like this:
Code:
$runfile = "run.tmp";
open(CVSRUN, $runfile) or die

...

system "cvs admin $runfile"
[code]
All the info that I need to change CVS's repository is in the file $runfile, but I can't get at the contents of $runfile with this command - so it ends up replacing things in CVS willy-nilly with "$runfile". (Um...or so I've been told, anyway. Naturally, I, um, wouldn't do anything so careless as to execute an unfinished code fragment. (Don't worry, I've got a backup handy.))

Any help with this will be very much appricated.

Thanks,
Meatsim
 
A couple of questions:

Why are you opening the file for input to your program, and also using it as input to cvs?

Have you tried piping the runfile to cvs? (Like this:
Code:
system &quot;cvs admin <$runfile&quot;;

I think we need a little more info or code to really help with this question.

Tracy Dryden
tracy@bydisn.com

Meddle not in the affairs of dragons,
For you are crunchy, and good with mustard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top