Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
laziness, impatience, and hubris
 
PerlMonks  

Ned help in perl

by manusnghl
on Sep 19, 2012 at 06:41 UTC ( #994408=perlquestion: print w/ replies, xml ) Need Help??
manusnghl has asked for the wisdom of the Perl Monks concerning the following question:

PERL 1. Write a Perl program to input one paragraph from the keyboard, with multiple sentences and words in it, and print those sentences in which at least one word has the same number of letters as the number of words in the sentence. For example, the sentence “Print this sentence” will not be printed, but the sentence “Print this short sentence” will be printed. The sentences should be printed with two words per line, unless it is the end of the sentence. E.g. If you type This is a short paragraph. Longer ones are too boring. Are they not? This would be printed as, This is a short paragraph Are they Not 2. a. Write a Perl program that asks a user for a filename, then opens that file and replaces all occurrences of three letter words with TLW and all positive decimal numbers up to 50 only by their word equivalents. E.g. 25 as twenty five. b. Write a Perl program that looks through /etc/passwd file, for names that occur in other person’s name and prints the full names of those people. Eg Shyam occurs in Shyamlal, so the full names of both Shyam and Shyamlal would be printed out. 3. a. Write a Perl regular expression to test whether a string looks like a valid NITC subject code of any class or branch. b. Write a Perl program to input a file of “State city” lines given in alphabetical order by states only and produce a second file with lines in format "city belongs to state", ordered in alphabetical order of cities. 4. a. In the file protdom.dat (which will be given to you) is a list of proteins with their PFAM domains, like this SwisProtID domain1 domain2 ... . From this list you have to construct the opposite list, ie. a list of proteins that contains a certain domain, like this Domain SwisProtID SwisProtID SwisProtID .... Then save the list in domprot.dat. This goal can be achieved in various ways, you should do it by using hash of hashes.

Original content restored by GrandFather

Comment on Ned help in perl
Re: Ned help in perl
by choroba (Abbot) on Sep 19, 2012 at 06:49 UTC
Re: Ned help in perl
by 2teez (Priest) on Sep 19, 2012 at 07:35 UTC

    ++ to choroba.
    manusnghl:
    If you can describe what you want as detailed as this, then you can also write the codes! Except it an assignment.
    And if so, show some effort from your end, then others would help out. And then, you are better for it.
    Hope this helps.

    If you tell me, I'll forget.
    If you show me, I'll remember.
    if you involve me, I'll understand.
    --- Author unknown to me
Re: Ned help in perl
by Utilitarian (Vicar) on Sep 19, 2012 at 07:55 UTC
    As choroba pointed out above, this isn't a code writing service and, while we may like to show off occasionally, you gain no benefit from your course if you don't try and solve the assigned problems. (choroba's advice on markup should also be heeded as your post is not an inviting read.)

    That said if you follow up with an honest demonstration of effort and genuine questions regarding why things aren't working the way you expect we are a friendly bunch and will offer useful advice but we're not here to do your homework and thus prevent you learning anything.

    print "Good ",qw(night morning afternoon evening)[(localtime)[2]/6]," fellow monks."
Re: Ned help in perl
by DrHyde (Prior) on Sep 19, 2012 at 09:29 UTC
    Sorry, perl can't help you to become a Ned.

      Thankfully!

Re: Ned help in perl
by Anonymous Monk on Sep 19, 2012 at 11:30 UTC
    Applying for a job are you?
Re: Ned help in perl
by AnomalousMonk (Monsignor) on Sep 20, 2012 at 04:59 UTC

    Please restore OPed content so that Ned's instructors can see where he or she has been going for help with assignments.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2014-04-16 12:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (425 votes), past polls