The magical <> will read from standard input once the argument list is used up. So remove the non-filename arguments from the list (and there will be nothing left) and <> will work as expected: read from files specified on the command line or from standard input if none are given.