in reply to Re: count total number of occurrence in all files
in thread Reaped: count total number of occurrence in all files

Hello Discipulus :). Actually there is no need for -n, because that's what while (<>) { } does (and -n just adds that loops around your code, as can be seen with -MO=Deparse). It opens each file passed as an argument in the filehandle ARGV, or reads from STDIN is @ARGV == 0.

Replies are listed 'Best First'.
Re^3: count total number of occurrence in all files
by Discipulus (Canon) on May 09, 2016 at 10:00 UTC
    Ah! i forgot this part, thanks Eily for the comment.

    L*

    There are no rules, there are no thumbs..
    Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.