http://www.perlmonks.org?node_id=856920


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