Could anyone show me an example of how to pause for one second in Perl? I am trying the sleep command and it isn't working.
#!/usr/bin/perl
use strict;
use warnings;
use diagnostics;
$| = 1; # Disable output buffering
for (1..10) {
print '.';
sleep 1;
}
print "\n";
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With