- or download this
#!/usr/bin/perl -w
use strict;
...
print Dumper \@AA; # See what's really in that array. Note the bac
+kslash.
...
- or download this
foreach $AA(@AA)
{
...
# ^^
# incorrect syntax
}
- or download this
# Sum the proteins' molecular weights.
my $sum; # no need to declare $sum until here.
...
print "AA: $AA Weight: $MWs{ $AA }\n";
$sum += $MWs{ $AA };
}