$| = 1; #### foreach (1..20) { print "a\n"; sleep (1);#between each element of the array there should be 1 second interval }