I need to process some records ( 10000 or more ) for this reason I am trying to make the code in the "foreach loop" to "sleep" for 10 seconds when the remainder of count reaches 100, can't think straight right now and this is the sample code I have:
...
my $count = 0;
foreach my $rec ( @{$names} ) {
$count++;
sleep(10) if $count / 10 == 100;
...
}
...