It is not even needed to deactivate buffering and change $|, since printing to STDOUT is line buffered (i.e. the buffer is flushed as soon as a newline character is found).$ perl -e 'use v5.10;for (1..10) {print "$_\n"; sleep(1);}' 1 2 3 4 5 6 7 8 9 10
In reply to Re: Print vs Say with sleep function
by Laurent_R
in thread Print vs Say with sleep function
by raghuprasad241
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |