Develop a Perl program that receives from the standard input one
aminoacid sequence and prints the length of the sequence and the
number of basic aminoacids contained in the sequence.
-It prints a message “Please insert an aminoacid sequence : ”
-It reads the aminoacid sequence from STDIN
-It substitutes all the white spaces and the newline character of the
sequence with the empty character.
-It checks with a pattern matching the sequence. If the sequence
contains characters different from the twenty aminoacids it gives an
error message.
-It assigns the length of the sequence to another variable.
-It counts the number of K+H+R.
-It prints the message “The typed sequence is”, followed by the length
of the sequence, followed by “ aminoacids long” followed by a new
line.
-It prints the message “It contains ”, followed by the number of
K+H+R, followed by “ basic aminoacids”, followed by new line”.
ed ecco cosa ho eseguito fino ad ora:

codice:
#!/usr/bin/perl -w
print "Please insert an aminoacid sequence : ";
$sequence=<STDIN>;
$sequence =~ s/\s//g;

# if-elsif-else conditionals
if($word eq 'J') {

print "error\n";

} elsif($word eq 'O') {

print "error\n";

} elsif ( $word eq 'U' ) {

print "error\n";

} elsif ($word eq 'X' ) {


print "error\n";

}

exit;