I want to write a subroutine to comparing the length of two sequences ( return 1 if 1st seq longer than 2nd se?

programming in perl
i write it this way but its not working i dont know why :( … and i didnt under stand your way of doing it

use strict;

# i am just writing this as an example to test my subroutine

my $firstSeq = "AGTUUUU";
my $secondSeq = "AGGG";
print "my result =", comparing ($firstSeq,$secondSeq),"\n";

sub comaring {

my $firstSeq = @_;
my $secondSeq = @_;
my $firtslength = length($firstSeq);
my $secondlength = length($secondSeq);

# can i do this? if (length($firstSeq) > length($secondSeq)){

if ($firtslength > $secondlength){
print "1 \n";
}

elsif ($firtslength == $secondlength){
print "0 \n";

}

elsif ($firtslength < $secondlength){
print "-1 \n";

}

}

Comments

  1. Germann A says:

    compareSequences(seq1, seq2){
    return (getSequenceLength(seq1) > getSequenceLength(seq2));
    }

legitimate work from home jobs | Event Planning Bay Area | rent video games | Homeloans | Plumbing Courses in Manchester | increase fertility | Green Drink | Photo Keyring | Vitamin D Deficiency Symptoms | skip bags | Order Fulfillment Software | virtual receptionist | Educators Credit | bodybuilding workouts | window cleaning
payday loan payday loans fibromyalgia ezetimibe buy ziagen buy cipro newyork travel narrow angle glaucoma headache Poker Software sciatic nerve damage cluster headache sciatica glaucoma fibromyalgia syndrome