Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

Newbie seeking help.

by Anonymous Monk
on Apr 19, 2001 at 21:51 UTC ( #73902=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a few programs that I have been struggling with, any help/examples would be appreciated.

1. write a perl program that detects and eliminates double words like "Paris in the the spring". The problem is that ANY word can appear as a double word so you can't have a list of "possiblities" and just check if the next word is also the same.

2. write a perl program that removes html from a webpage (instructions delimited by <...>). Just output the page without the embedded html.

3. Write a perl program that checks an email file. Which pair of people emailed each other the most?

4. write a perl program that determines the 5 oldest files if given a directory listing.

2001-04-20 Edit by Corion : Added formatting

Replies are listed 'Best First'.
Re: Newbie seeking help.
by dvergin (Monsignor) on Apr 19, 2001 at 22:09 UTC
    Actually, we don't mind helping with homework. We just don't like doing it for you. Suggestion: pick one of these assignments, show us your best serious attempt to solve it, and you'll get help.

    And if you paste in code (highly recommended for best response), be sure to surround it with <code> . . . </code> tags so that your nice formatting is not lost.

Re: Newbie seeking help.
by deprecated (Priest) on Apr 19, 2001 at 21:57 UTC
    Two of these problems are solved (exactly) in one line of code in jeffrey friedl's Mastering Regular Expressions.

    brother dep.

    Laziness, Impatience, Hubris, and Generosity.

Re: Newbie seeking help.
by converter (Priest) on Apr 19, 2001 at 21:58 UTC

    Well, at least you remembered not to type the class number and professor's name at the top.

Homework, don't reply :Re: Newbie seeking help.
by Corion (Pope) on Apr 19, 2001 at 21:55 UTC

    This really smells like homework to me :-(

    The answers to these questions can be found in Mastering Regular Expressions mostly.

Re: Newbie seeking help.
by Anonymous Monk on Apr 19, 2001 at 23:05 UTC
    Thanks for the suggestions. Actually this isn't homework for a class. I have started to try to learn perl via a tutorial. These are some of the programs listed to try. They don't give any answers to them so I was looking for some examples from people who know what they are doing to get myself started.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://73902]
Approved by root
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2020-09-24 00:02 GMT
Find Nodes?
    Voting Booth?
    If at first I donít succeed, I Ö

    Results (132 votes). Check out past polls.