Putting Sleep into foreach loop : sleep « System Functions « Perl






Putting Sleep into foreach loop

     


#!/usr/bin/perl -w

use strict;

foreach (1..20) {
    print ".";
    sleep 1;
} 
print "\n";

   
    
    
    
    
  








Related examples in the same category

1.The sleep command puts your process to sleep for a number of seconds