Thread Can't "last" outside a loop block at ..... (7 answers)
Opened by esskar at 2008-05-18 23:21

RalphFFM
 2008-05-19 00:27
#109887 #109887
User since
2006-11-16
258 Artikel
BenutzerIn
[Homepage] [default_avatar]
Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/perl
use strict;
use warnings;
my $count = 10;
{
        do {
                print "$count\n";
                $count--;
                last if $count == 3;
        }
        while($count > 0);
}
print "$count\n";

Hmm, trotzdem irgendwie unschön, fühle mich plötzlich irgendwie umklammert. ;)

View full thread Can't "last" outside a loop block at .....