I must not be calling the function incorrectly or recieving the arguments
incorrectly because I only get one line printed in PrintResults() but i have
verified in ExecCommand() that I have a whole screen full in 'results'

here is the code:

my @results = ExecCommand( $someCommand, 1 );
&PrintResults( @results );

sub ExecCommand( $command, $waitForPrompt )
{
   my @lines;

   my $command       = shift;
   my $waitForPrompt = shift;

   sleep( 1 );
   if( $waitForPrompt == 0 )
   {
      $server->print( $command );
   }
   else
   {
      @lines = $server->cmd( $command );
   }

   return @lines;
}
sub PrintResults( @results )
{
   #it appears I only have one item in the list...

   my @results = shift;
   foreach my $line (@results)
   {
     print( "[$line]" );
   }
}

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

Reply via email to