Ravendark has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am new to perl and I am trying to write a script to telnet to a machine and send some commands. The problem I am having is with the waitfor command. The prompt is something like: RAPTOR_ILION> or MALC_NIKAIA>. So I thought that having this: waitfor('*>'); would do the job. Could you please help me? Is this *> wrong? Cheers.

Replies are listed 'Best First'.
Re: telnet waitfor command
by Corion (Patriarch) on Nov 15, 2010 at 10:26 UTC

    Yes. Read the Net::Telnet documentation. ->waitfor() takes a string that is a valid regular expression, not file wildcards.