go ahead... be a heretic | |
PerlMonks |
Re: Print vs Say with sleep functionby Laurent_R (Canon) |
on Jan 19, 2016 at 23:02 UTC ( [id://1153130]=note: print w/replies, xml ) | Need Help?? |
Just changing Example 2 to this should give you the same result as with say:
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).
In Section
Seekers of Perl Wisdom
|
|