Thread String einlesen und nachfolgendes Wort ausgeben (20 answers)
Opened by SCORRPiO at 2014-04-15 10:15

FIFO
 2014-04-15 14:04
#174785 #174785
User since
2005-06-01
469 Artikel
BenutzerIn

user image
ja, oder so. Ich vermute mal, dass der OP die Zeilen mit OPTIMAL übergehen will. In so einem Fall (einfache Abbruchbedingung) finde ich diese Formulierung am intuitivsten:
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
{
    next if $zeile =~ / \b OPTIMAL \b /x;

    if ( $match ) {

    }
    else {
        print "UNKNOWN\n";
    }
}
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it? -- Brian Kernighan: "The Elements of Programming Style"

View full thread String einlesen und nachfolgendes Wort ausgeben