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

cancel script completely on ctrl-c

I found this question interesting: basically how to cancel completely a script and all child processes : You do this by creating a subro...