Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^4: problem count the number of words -- oneliner

by kschwab (Vicar)
on Dec 26, 2018 at 17:38 UTC ( [id://1227719]=note: print w/replies, xml ) Need Help??


in reply to Re^3: problem count the number of words -- oneliner
in thread problem count the number of words

Guess it depends on what OP means by "all words", but sure.
# works like wc perl -ne 's/\s+/$i++/eg;END{print "$i\n"}' f1 f2
Not sure why you have the "i" modifier.

Replies are listed 'Best First'.
Re^5: problem count the number of words -- oneliner
by pme (Monsignor) on Dec 26, 2018 at 21:00 UTC
    You are right, we do not need "i".

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (5)
As of 2024-04-18 06:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found