
Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
A perl lab exercise for bif 101 students, consisting of six programming tasks. Students are required to write and email their solutions, including helpful comments. The tasks involve using the tr, concatenation, substitute, length, index, rindex, uc, lc, reverse, and substr operators to manipulate strings.
Typology: Lab Reports
1 / 1
This page cannot be seen from the preview
Don't miss anything!
BIF 101 Lab # 3 – Practice with Strings 9/18/08 DUE: before lab 9/25/
For this lab you will use the information from chapter 3 to write your own programs to manipulate strings. Make sure that each program is well structured (see handout) and contains helpful comments.
You should email these programs as attachments to burhansd@canisius.edu
In the body of your email provide a few comments about the difficulty (or lack thereof) of this assignment.
Write the following Perl programs:
Create a string variable with the value “you know you should get up earlier you will be late” Use the tr operator to change “you” to “YOU” and print the result
Create at least 4 string variables, use the concatenation operator to join them and store this value in a fifth string variable. Print the original variables out, one per line, followed by the new variable containing the concatenated value.
Create a string variable that contains an imperative sentence with a proper name, for example, “Debbie, clean your room!”. Print this variable out. Use the substitute operator to substitute a different proper name and print this new value out (on the next line).
Create a string variable and assign it a value that contains at least 10 characters. Demonstrate the use of length, index, rindex, uc, lc, reverse, and substr using this variable and print your results.
Type the code from page 46 into a program and run it.
Copy your ATrich.pl program, call this copy CpG.pl Now change the program so that it upper-cases C and G rather than A and T, have the message it prints be “CG-rich” (rather than “AT-rich).