Ruby Scripting versus PHP Scripting
Just like the similarities we found when we looked at Ruby’s and PHP’s syntax, we are going to take things a step further and dive into the similarities between Ruby scripts and PHP scripts. A script is a piece of code that will run a task and then stop its execution. Said task may be simple or complex, but it is not considered an application as it stops once the task is done and only performs the task. Let’s take this step together and start writing simple scripts so that we can eventually write full-fledged applications.
With that in mind, in this chapter, we will cover the following topics:
- Useful scripts
- Text handling
- File handling
- Command-line arguments