Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: how to search for a string in large file?

by oiskuu (Hermit)
on Mar 18, 2014 at 18:22 UTC ( #1078845=note: print w/ replies, xml ) Need Help??


in reply to how to search for a string in large file?

perl -ne '$n += () = /foo/g }{ print $n' <(< large.txt fgrep foo)
Though this might not cover them all. Should "foof" match "foofoof" once or twice?

Replies are listed 'Best First'.
Re^2: how to search for a string in large file?
by littlemonk (Sexton) on Mar 18, 2014 at 18:55 UTC
    could please explain me the answer .. im new to perl!! :(

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (7)
As of 2016-06-30 17:11 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred method of making French fries (chips) is in a ...











    Results (399 votes). Check out past polls.