(空白標題)
#!/usr/bin/perl -w
# Concatenating DNA
# Store four DNA fragments into four variables called $DNA1 and $DNA2 and $DNA3
and $DNA4
$DNA1 = 'gaaacaccagtcttgagaggtggccagcca';
$DNA2 = 'gactgcctgtccacatgcgtgtcagcacatacag';
$DNA3 = 'ccgcttcctggaagccgcctggaatgtc';
$DNA4 = 'ttcacggcagcgttttgc';
# print the DNA onto the screen
print "Here are the original four DNA fragments:\n\n";
print $DNA1, "\n";
print $DNA2, "\n";
print $DNA3, "\n";
print $DNA4, "\n\n";
# Concatenate the DNA fragments into a fifth variable and print them
# Using "string interpolation"
$DNA5 = $DNA1 . $DNA2 . $DNA3 . $DNA4;
print "Here is the concatenation of the first four fragments:\n\n";
print "$DNA5\n\n";
exit;
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.129.14.46
推
218.163.223.39 06/14, , 1F
218.163.223.39 06/14, 1F
推
140.117.183.181 06/15, , 2F
140.117.183.181 06/15, 2F
推
140.134.242.70 06/15, , 3F
140.134.242.70 06/15, 3F
→
140.134.242.70 06/15, , 4F
140.134.242.70 06/15, 4F
推
61.229.97.88 06/15, , 5F
61.229.97.88 06/15, 5F
→
61.229.97.88 06/15, , 6F
61.229.97.88 06/15, 6F
→
61.229.97.88 06/15, , 7F
61.229.97.88 06/15, 7F
推
140.117.183.181 06/16, , 8F
140.117.183.181 06/16, 8F
→
140.117.183.181 06/16, , 9F
140.117.183.181 06/16, 9F
推
61.229.113.252 06/16, , 10F
61.229.113.252 06/16, 10F
討論串 (同標題文章)