Scripting with bash can help you with the automation of tasks and you can achieve a great deal by mastering bash scripting. However, your journey should not end with bash. While we have seen the power available in your bash scripts, we are limited by the commands we can run and the options they have. Bash scripts allow us to access commands; whereas, if we use Perl scripts, we have access to the programming interfaces or the APIs of the system. In this way, we can often achieve more with fewer resources.
In this chapter, we will introduce Perl scripting and some other basic scripts that we can use to learn Perl; we will cover the following topics:
What is Perl?
Hello World
Arrays in Perl
Conditional tests in Perl
Functions