Right now I noticed that if you write
use strict; use warnings; foreach my $value (10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 'БУМ...'){ print $value; sleep(1); }
That program waits when 11 seconds pass and displays all the contents. And if you change
use strict; use warnings; foreach my $value (10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 'БУМ...'){ print $value, "\n"; sleep(1); }
Then everything is fine (every second the figure is displayed). So why in the first case, the text is stored in the "buffer", and in the second immediately displayed? Indeed, in fact, there is no difference between them ...
\n
, as I understand it. - Error