Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^2: count total number of occurrence in all files

by Eily (Monsignor)
on May 09, 2016 at 09:35 UTC ( [id://1162530]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1162530]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 04:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found