Dealing with Prompts while using Perl and SSH
<p>While using perl and Net::SSH:Expect, does anyone know how to continue to press "\r\n" until you receive a certain type of prompt "#"?  The router doesn't accept any type of command to extend the terminal length such as "terminal length 0".  Output commands ">" are not support on the router either.  I've tried using the below command, but still no luck</p>

<pre><code>    $ssh-&gt;send("show vlan all\r\n");
    START:
    $ssh-&gt;send("\r\n");
    while ( $ssh-&gt;has_line() ) {

        print $output= $ssh-&gt;read_line() ."\n";
        print OUTPUT "$output\n";

        }   
    $ssh-&gt;waitfor('#',5) or  goto START;
</code></pre>

<p>I need some form of loop that sends a carriage return until a prompt is received.</p>