Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: extracting specific information from a txt file

by apl (Monsignor)
on Aug 24, 2010 at 12:22 UTC ( [id://856920]=note: print w/replies, xml ) Need Help??


in reply to extracting specific information from a txt file

Write a small program that opens the text file, reads it line by line, and prints out each line read.

Then modify it to count the number of characters in each line.

Then modify it to count the number of words in each line.

Then modify it to find a string containing @.

Then modify it to generalize the search to look for an e-mail address (text@text.tla).

Then modify it to look for a number after the e-mail address.

Then modify it to read blocks of text separated by % (rather than by line).

Show us the code that presents a problem to you, and we'll be glad to help.

  • Comment on Re: extracting specific information from a txt file

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (8)
As of 2024-04-23 08:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found