in reply to Input redirection

Since breaking things up bypasses the shell (definitely a good thing), your "< /dev/null" bit will be passed as-is as an argument to ci, which is not what you want. The shell is what does your pipes and redirections for these types of things.

To simulate the same behavior, just close STDIN before calling system (assuming you don't need it):

close(STDIN); system($ci, '-u', '-zLT', $file);
If you do need STDIN, and still need your multiple-argument form of system, consider saving STDIN, closing it, and re-opening it when you're done:
open(STDSAVE, "<&STDIN"); close(STDIN); system(...); open(STDIN, "<&STDSAVE");
Incidentally, does the -q flag allow you to do this in a "batch"/non-interactive mode without worrying about this sort of thing?

Replies are listed 'Best First'.
Re: Re: Input redirection
by Withnail (Novice) on Dec 14, 2000 at 04:38 UTC
    I solved a similar problem by using the /dev/null approach and surrounding the ci command with "back-ticks" instead of using the "system" command.

    As an aside: using '-q' will stop the query if RCSdetects no differences between what you're trying to check in and what's already checked in - it silently aborts the checkin.

    If you want to force a checkin anyway, use '-f' instead.

    Hope this is useful!