12 lines
186 B
Perl
12 lines
186 B
Perl
|
#!/usr/bin/perl
|
||
|
|
||
|
sub worker {
|
||
|
my ($id) = @_;
|
||
|
print "worker in id: $id\n";
|
||
|
die "num 6" if $id==6;
|
||
|
sleep(1);
|
||
|
}
|
||
|
|
||
|
for( $a = 0; $a < 10; $a = $a + 1 ){
|
||
|
worker($a)
|
||
|
}
|