In C you can "break" out of a for loop and go on to the next series of
statments. How do you do this in PERL?

sub PrintResults( @results )
{
   my @results = shift;

   foreach my $line (@results )
   {
      $line = &Trim( $line );
      if( length($line) )
      {
         if( $line =~ /SNMP TrapReceivers/ )
         {
            break; # what's the right way?
         }
      }
   }

   print( $line );
   foreach $line (@results)
   {
      $line = &Trim( $line );
      if( length($line) )
      {
         print( $line );
      }
      elsif
      {
        break; # what's the right way?
        }
   }
}

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

Reply via email to