Tuesday, June 1, 2010

turn on autoflush in perl

to automatically flush the results of the Print commands:


Turn on "autoflush":

Put this just after your #!/.../perl line.
$|++;





Turn on autoflush in a BEGIN block:
BEGIN { $| = 1 } taken from: http://www.perlmonks.org/?node_id=20590

No comments:

Post a Comment