Jorge Almeida wrote:
OK, I suppose there is no way to do it...

I have an interactive, shell-like, program. Some commands read a line
from STDIN, or the whole STDIN (meaning until CTRL-D is pressed). Now I
want to modify the program to have a batch mode. Commands would be read
from STDIN (probably redirected from a file), as well as the data, if
any. The problem is how to keep the data for several commands in the
same file. One command would read a part of the data (as if it were the
whole input), the next command would read the next part, and so on. But
since some commands pass the input through the shell before using it, I
can't just read a chunk until some special character is found and call
it "the whole" stdin...
Impossible task, probably...

How big are these files?  Could you read everything at once?  If it's 
interactive, the user may choose different commands based on intermediate 
results, but if it's in batch mode, all the commands can be read at once; they 
won't change.


--
Just my 0.00000002 million dollars worth,
 Shawn

"For the things we have to learn before we can do them, we learn by doing them."
 Aristotle

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to