Thread next LABEL in Subroutinen: gibt es feinere Lösungswege? (9 answers)
Opened by bloonix at 2006-12-13 15:17

renee
 2006-12-13 15:28
#72505 #72505
User since
2003-08-04
14371 Artikel
ModeratorIn
[Homepage] [default_avatar]
Ungetestet (nur mal so ne Überlegung):
Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
MYLOOP: while ( 1 ) {

open my $fh1, '<', "$file1" or foobar($file1) and next;
# irgendeine Verarbeitung
close $fh1;

open my $fh2, '<', "$file2" or foobar($file2) and next;
# irgendeine Verarbeitung
close $fh2;

open my $fh3, '<', "$file3" or foobar($file3) and next;
# irgendeine Verarbeitung
close $fh3;

}

sub foobar {
my $file = shift;
print STDERR "unable to open $file: $!\n";
print STDERR "sleep for 3 seconds\n";
sleep 3;
print STDERR "wakeup\n";
}
OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/)
--

Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html
Perl-Entwicklung: http://perl-services.de/

View full thread next LABEL in Subroutinen: gibt es feinere Lösungswege?