Explore BrainMass

Explore BrainMass

    Perl: RNA Code

    This content was COPIED from BrainMass.com - View the original, and get the already-completed solution here!

    The following code is written in the Perl programming language:
    @sequence = split(//,$RNA)

    What does sequence [3] equal?

    We next use the following code to define the variable $temp:
    $temp = scalar @sequence;

    What is the value of $temp?

    How many places will the regular expression /U[AG]A/ match $RNA (e.g. how many matches for the expression: $RNA =~/U[AG]A/.
    a) 0
    b) 1
    c) 2
    d) 3

    © BrainMass Inc. brainmass.com October 10, 2019, 6:05 am ad1c9bdddf

    Solution Preview

    1. $sequence[3] should equal to the character C
    This is because:


    splits the string RNA into an character array. Notice the array starts at index 0, so $sequence[3] is ...

    Solution Summary

    This solution quickly reviews regular expression in the perl programming language and how to apply this concept to the given problems. The solution is verified by perl.