Appendix - Solutions to problems
Published online by Cambridge University Press: 05 November 2012
Summary
Remember, there’s more than one way to do it!
At the end of some of the Unix and Perl chapters, we have provided one or more problems for you to tackle. For the Perl problems, it is important to realize that nearly all problems can be solved in a myriad of different ways. Some solutions will comprise elements that are clearly ‘variants on a theme,’ whereas others might include ideas that are completely unrelated. This can be great for creative thinkers, but at the same time it can be daunting for people who want to know the right way to do something. Sometimes, two different solutions may be functionally identical and will differ only in the readability of the code and in their use of Perl’s many magical shortcuts.
Be wary of people who claim that a specific Perl script offers the ‘best’ solution to a problem. The ‘best’ solution to any problem can be highly subjective. For example, some people want their code to run as fast as possible; others want it to be as understandable as possible; the two approaches are not always mutually compatible. In this appendix we mostly provide just one solution for each of the problems we have described. We have endeavored to choose solutions that are easy to understand but we encourage you to think of alternative solutions as well.
- Type
- Chapter
- Information
- UNIX and Perl to the Rescue!A Field Guide for the Life Sciences (and Other Data-rich Pursuits), pp. 393 - 409Publisher: Cambridge University PressPrint publication year: 2012