Question: Perl programming/syntax --Write a simple program with a hard-coded hash of arrays. The program should print out the hash of arrays when run. --Place the

Perl programming/syntax

--Write a simple program with a hard-coded hash of arrays. The program should print out the hash of arrays when run.

--Place the function from last week's "two argument" random DNA generation question into a module. The module should export the function.

(The function is shown below)

 #! /opt/perl/bin/perl use strict; use warnings; my @bases = qw/ A C G T /; my $length = 50; sub random_sequence { my( $length , $random_length ) = @_; if ( $random_length ) { $length = int( rand( $length )); } foreach ( 1 .. $length ) { print $bases[int(rand(4))]; } print " "; } random_sequence( 50 ); random_sequence( 50 , 1 ); 

--Modify the module from the previous question by adding documentation (in POD format) to explain the two ways the function can be called and the different results of each.

--Use Test::Simple to produce a simple test framework that exercises the module from the previous questions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!