The second method (while(1) {) translates roughly to "read and print <$foo> forever". Unfortunately, once you're finished reading the file the while statement doesn't terminate. That's why the program hangs.
In reply to Re: help with
by jlongino
in thread help with the diamond operator
by La12
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |