Our Sponsors



Download BioinformaticsOnline(BOL) Apps in your chrome browser.




  • BioScripts
  • Nishi Singh
  • Concatenate two given sequences, and find the length of the new sequence and also print out the...

Concatenate two given sequences, and find the length of the new sequence and also print out the second codon of the sequence

  • Public
By Nishi Singh 2901 days ago
#!/usr/bin/perl use strict; use warnings; #assign strings to variables my $DNA = "GATTACACAT"; my $polyA = "AAAA"; #concatenate two strings my $modifiedDNA = $DNA.$polyA; #calculate the length of $modifiedDNA and #print out the value of the variable and its length my $DNAlength = length($modifiedDNA); print "Modified DNA: $modifiedDNA has length $DNAlength\n"; #extract the second codon in $modifiedDNA my $codon = substr($modifiedDNA,3,3); print "Second codon is $codon\n";