I came across some code on the internet that looks like this (this is only part of the script):

while (<align>) {
          $line=$_;
        if ($line=~/^>(.+)/) {
                if ($seq) {
                        $pro{$name}=$seq;
#print "SEQ:\n$pro\n\n";
                }
                $name=$1;
                    $name=~s/\s//g;
            push @names, $name;
#print "$name\n";
                $k++;
                $seq="";
        }
        else {
                chomp $line;
                $seq.=$line;
        }
}

I am having trouble figuring out how the nested if statements work (i.e. what is the order of operation etc...) and their associated else statements. I pretty much understand the rest of what is going on but I am having trouble "putting into words" what the nested if statements are doing. I mean I know enough that the code is... ummm... yuck!!! :-)

-Thanks for any help!
-Mike


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to