while (<>) { # ... process a chunk of input ... # ... print result ... }