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

Re: how can i search a text file for a string and print every occurence of that string

by Hofmator (Curate)
on Jul 20, 2001 at 16:44 UTC ( [id://98391]=note: print w/replies, xml ) Need Help??


in reply to how can i search a text file for a string and print every occurence of that string

I normally wouldn't program that by hand. Depending on your operating system I would use a grep variant (on *nix) or find/findstr (on Win). Alternatively you can use the equivalent from the Perl Power Tools .

--Hofmator

  • Comment on Re: how can i search a text file for a string and print every occurence of that string

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-04-24 11:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found