in reply to Print vs Say with sleep function

Standard output is buffered. The buffer is flushed when a newline is encountered. To cancel buffering, try
perl -we '$| = 1; for (1..10) { print $_; sleep 1;}'

You can also call

STDOUT->autoflush(1);

with the same effect as setting the variable.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Print vs Say with sleep function
by raghuprasad241 (Beadle) on Jan 19, 2016 at 22:26 UTC
    Thank you Choroba. This helped me!