http://qs321.pair.com?node_id=120275


in reply to Basic Input and Output

while(<>){ #reads lines until end of file or a Control-D from the keyboard .. unless you are on a windows system, in which case you press Ctrl-Z instead.