Hello Jason,

Saturday, November 03, 2001, Jason Cruces <[EMAIL PROTECTED]> wrote:

JC> Hello all,
JC> Probably are really simple one but haven't found the
JC> answer yet. In an interactive program, where a user is
JC> prompted to enter more than one value, I would use

JC> chomp(@values = <STDIN>);

JC> And to terminate the input, enter Ctrl-D (or Ctrl-Z on
JC> windows).
JC> My question is, how would I change the terminating
JC> characters (Ctrl-D) to the user just hitting the enter
JC> key (or any other character)?
JC> I tried a do/until statement like
here is a couple of errors in your program:

JC> do{
JC> $i=0;
1. your $i always is 0.
JC> chomp($value[$i] = <STDIN>).
2. '.' at the end of string causes trouble. replace it with ';'.
JC> $i++;
JC> }until (! $value[$i]);
3. your $value[$i] always undefined in until condition, because $i
changed after input.

JC> but still not having much luck. Any ideas?
something like

$i=-1;
do{
$i++;
chomp($value[$i] = <STDIN>);
} until (!$value[$i]);


Best wishes,
 Maxim                            mailto:[EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to