In this post we will see some good practice while you write your Perl scripts . If you see my previous post Getting started with Awesome Perl I have discussed usage of default variable $_ while what we see in this post how good for a programmer is to use the default variable
It's for sure that the default variable ($_) does the work but when you have a large chunk of code , readability of the code will become a problem . Lets take a piece of code and analyze it .
Let's pass some sql data into an array like one shown below
my @data = `db2 "list tables for schema DB2INST1"`
Now the array @data is populated with some data , lets go and do some manipulations