![]() |
|< 1 2 >| | ![]() |
16 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
11
12
my $counter = 0;
my $start;
my $end;
while (<DATA>) {
$counter++ if /send/i;
$start = time if($counter == 1);
if($counter == 3){
$counter = 0;
$end = time;
system("shellscript.sh &") if(($end - $start) > 3);
}
}
1
2
3
4
5
6
7
8
my @times;
while (<>) {
next unless /RING/i; # alles, was kein RING ist, ueberspringen
if (@times >= 3 && time - shift @times < 3) { # 3 mal und weniger als 3 Sekunden
system ('shellskript &') == 0 or warn "kann shellskript nicht starten: $@";
}
push @times, time;
}
![]() |
|< 1 2 >| | ![]() |
16 Einträge, 2 Seiten |