in reply to Re: Interactive input via telnet
in thread Interactive input via telnet

First, thanks for your quick answer. I got the following error in your code:
missing opening delimiter of match operator in argument "(?-xism:/\[y, +\s*q\]/)" given to Net::Telnet::waitfor() at C:\Documents and Settings\yonae\wor +kspace\Dat abase_Connection\try.pl line 32
Can you please advice. moreover, in this case I "know" for which question to wait for and sent the answer "y"... But, How can I write interactive code according to the input that I'll get? mean to present to the user the question and according to him choice to send the answer. Thanks.

Replies are listed 'Best First'.
Re^3: Interactive input via telnet
by glide (Pilgrim) on Nov 05, 2007 at 18:10 UTC
    O can use a more generic match (like: /\s\?\s*$/) and then use the $prematch var to question the user about the prompt.