|Perl: the Markov chain saw|
Re: Issues regarding for loops and recursionby Corion (Patriarch)
|on Jan 09, 2023 at 12:44 UTC ( #11149456=note: print w/replies, xml )||Need Help??|
Hi Nickmofoe, and welcome to Perl!
Here you match against $_, but it was never set. Did you want to match against $seq? I'm not sure.
Some general stylistic things:
You should check whether opening the file actually succeeded:
You should use the strict pragma. This requires you to declare all variables but on the upside, it allows Perl to tell you about typos in your variable names.
When assigning the %amino_acid_conversion, you could use newlines to make the code a bit more readable:
In Section Seekers of Perl Wisdom