in reply to count total number of occurrence in all files
Your input loop is exactly like the example for the special case of <> in I/O Operators. You must change your code to handle multiple files differently. We cannot help you until you tell us exactly what you do expect.
UPDATE: In your existing code, @ARGV is will be zero regardless of how many files you specify. They are all shifted off by <>. You probably want to save it before you start the loop.
|
|---|