Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you're writing a filter, an even better pattern is:

        while (<>) {
                ...
        }
By omitting the file handle, "<>" will go line by line through each filename specified on the command line. If no filename arguments were passed, it reads from STDIN.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: