[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1108
  • Last Modified:

fflush() function

when I print some texts to stdout using print function, it
seems that I have to put "\n" at the end of string in order
for the texts to flush to the screen.  Is there a function
to flush the buffer to the screen such as fflush in "C"?

Thanks

--
Hiep
0
hdo120497
Asked:
hdo120497
1 Solution
 
ahoffmannCommented:
$|=1;

# keep in mind that if you print to stdout, stderr, the OS's I/O
# system has a buffer too which needs to be flushed

0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Tackle projects and never again get stuck behind a technical roadblock.
Join Now