On Mon, 6 Aug 2007, Ken Foskey wrote:
On Sun, 2007-08-05 at 18:26 +0100, Jorge Almeida wrote:
It sounds like you want something similar to parameter handling,
generally this works on escalating files. eg /etc/myprog overridden by
~/.myprog overrridden by a specific options file and so on.
T
On Sun, 2007-08-05 at 18:26 +0100, Jorge Almeida wrote:
> 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
On Sun, 5 Aug 2007, Mr. Shawn H. Corey wrote:
See `perldoc perlfaq8` and search for "How can I open a pipe both to and from
a command?"
Thank you. I'll have to decide whether using IPC::Open2 is safe
enough...
--
Jorge Almeida
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional com
Jorge Almeida wrote:
They're small enough to be slurped. The problem is that the chunk for a
particular command may need to be passed to the shell for processing
before being used by the Perl program. Something like this:
1my @all=;
2my @chunk=();
3for (@all
On Sun, 5 Aug 2007, Mr. Shawn H. Corey wrote:
How big are these files? Could you read everything at once? If it's
They're small enough to be slurped. The problem is that the chunk for a
particular command may need to be passed to the shell for processing
before being used by the Perl progra
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 (probabl
On Sun, 5 Aug 2007, John W. Krahn wrote:
Jorge Almeida wrote:
Is there some variable that will do for a file what $/ does for a
record?
Note that reading STDIN line by line and checking for a character won't
do the job, because somewhere in the program I need something like
open(F
On Sun, 5 Aug 2007, Mumia W. wrote:
On 08/05/2007 07:21 AM, Jorge Almeida wrote:
open(F,"do-something|");
while(){...}
and later
open(G,"do-something-else|")
while(){...}
What do F and G have to do with STDIN?
Everything...
The code "while(){...}" does not read from ST
Jorge Almeida wrote:
Is there some variable that will do for a file what $/ does for a
record?
What I mean is that in
$s=
the value of $s depends on the value of $/, but in
@arr=
I couldn't find a way to force the reading to stop when some character
is found.
There is no "eof" character
On Sun, 2007-08-05 at 13:21 +0100, Jorge Almeida wrote:
> Is there some variable that will do for a file what $/ does for a
> record?
> What I mean is that in
> $s=
> the value of $s depends on the value of $/, but in
> @arr=
You mention EOF and you mean EOL (end of line). Since you k
On 08/05/2007 07:21 AM, Jorge Almeida wrote:
Is there some variable that will do for a file what $/ does for a
record?
What I mean is that in
$s=
the value of $s depends on the value of $/, but in
@arr=
I couldn't find a way to force the reading to stop when some character
is found.
Note
11 matches
Mail list logo