Thread Scope und next (3 answers)
Opened by bianca at 2010-06-22 18:56

bianca
 2010-06-22 19:20
#138795 #138795
User since
2009-09-13
6977 Artikel
BenutzerIn

user image
Geil, das kannte ich garnicht.

Lösung (hab ich das so richtig gemacht oder funktioniert das nur zufällig?):
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/perl -w
use strict;
use warnings;
use diagnostics;

test: for (1..10) {
        {
                next test if ($_ == 3);
        }
        print "$_\n";
        # 3 wird übersprungen
}


Danke Dir!
10 print "Hallo"
20 goto 10

View full thread Scope und next