We're routinely facing situations where we need to quickly master to a functional competency level a particular module usage. What can greatly influence
the depth of the learning curve and the retention of information afterwards is the module documentation; exceedingly technical documentation is dry and
maybe discouraging to revisit over and over, sparse documentation doesn't do justice to the module capabilities and leaves much unexplained, lack of code
illustrations makes it uneasy for the example-oriented readers. The size of the module too plays a role on how efficient and clear it is documented, however
there are some very large modules with very great documentation and support. Much kudos go to all the Perl community for all the selfless efforts and to
the Monastery for providing a place to learn more and add more to the community in ways that compensate for these caveats and say thank you to all the
whole entire Perl initiative.

In Perl there exists many different approaches to handling textual input and then (re)formatting the output to assume an intelligible design
(or a mysteriously cabalistic one!). Perl text processing capabilities are well established, this is reflected in many areas like
Regular Expressions,Predefined Variables,
Functions and Operators such as cmp, eq, uc,lc, pack,unpack...etc, and the existence of many CPANcategories and namespaces to modules that take text processing and output formatting
capabilities to skylimits.

Unarguably, tabulated representation of data has significant values, cluttered or clumsy reports can make for grumby colleagues, a lashing boss,
and a ruined day (if not career), Perl springs to the rescue, programming interfaces libraries to enable carrying out of such represntation jobs
easier are abundantly spread across many CPAN namespaces too; Alzabo::Table,
Table, PDF::Table,
Tk::Table,Spreadsheet::WriteExcel
and Text::Table are all but few examples of libraries to handle
tabulation tasks with efficiency.

Here I am attempting to provide a quick jumpstart to the module Text::Table
This tutorial in no way does attempt to replace the original documentation to the module rather than to add to it.

The best thing about this module is that it allows you to generate flexible tables with dynamic column alignment attributes, that is, the column width is
dictated by the size of the widest item it has, and data items within the column can be aligned to the left, right or center from the column boundary. This
lifts off from the burden a bit of the trial and re-trial of different spacing arrangements via sprintf for example.

What you need before we get started is a general knowledge level regarding OOP, Referencing and Dereferencing and the module
Text::Table installed, check Installing Modules if you are not familiar with installing Perl non-core modules, then you need a dataset to
play with while wading along, this is brought to you from the Martian Blossoms Juniors saved in Kindergarten.txt

Reading this dataset into two hashes of anonymous hashes, %students_51 and %students_53 each with the student names as keys whose values are
anonymous hashes with the keys (name, age, topic, class). ALL these keys are your variables (table headers) while their values are data for your table.
Each table represents a class year, 2051 or 2053. Note the Data::Dumper output has empty values for some of the students at some of
the variables since the parsing code below reads a line per line through the dataset and whereof blanks are taken to correspond to empty values for the
corresponding variables,

Now, lets create tables for each of our two classes, later we will merge these tables together. Creating tables involves creating a table object of the module
Text::Table foreach student from Martian Blossoms Juniors and this entails (in part) looping through the hashes %students_51 and
students_53. Creating a table object can also allow you to create table column-heads on the go:

Text::Table adds data to the table in line-wise or in bulk fashions, there are two functions achieving this, the add() and load(),
with the later being the bulk loader of a group of datalines to the table at once. Interestingly, Text::Table performance doesn't crumble on empty values.

Every call to add() inserts a line of values into the table, this line corresponds to a table record, a white-space fed to either add() or
load() is an empty table record, this comes in handy if you're manually merging tables together as a measure to ensure that they have the
same number of lines (records). Text::Table has taken care of formatting and aligning its own cells in columns efficienty, since Chiilak
didn't have any info filled in the topic section for her entry that cell was left blank.

Let's add data in bulk to the table table_53 this is simply achievable by passing an array reference or an anonymous array to load(),
the headers to this table are somewhat fancy that they are underlined. A fourth student named Zuxu whose incomplete information record is provided in an
array named @zuxu_data is added simply by passing a reference to @zuxu_data from within load() sufficing its requirement and adding
that record to the table in return.

Each record in the table is a standalone data line that can be accessed/retrieved individually, also any cell that has a new line character would be taken
as a two-line cell, so here, our header for the table $table_53 has in fact two lines. Passing the line number to the function table()
would return that line (or those group of lines as in the following example), did we need \n in the print statement inside the
foreach loop? Why (not)?.

If you really cared less about the entire table but more about its body, then invoking the more becoming function body() is more direct forward and
it can be used in essentially the same way table() can.

Another approach to invoking the above two functions is without passing a subscript as an argument, this way you can assign the entire table to an array with
or without its headers. The table data alignment is uniformly intact as well

If we loaded our two tables bodies into the arrays @headless_51 and @headless_53 respectively and attempted to conceptually merge them
-side by side- we will not get the merging that we want since each table record is a standlone line.

As you've noticed all the indices for these functions from Text::Table that accept indices for their arguements are zero based, select() is
not an exception too. It allows you to quickly generate subtables from your tables and merge them in the ordering you want simply by passing column numbers
from the parent tables to be selected into the subtable, It is also possible to rearrange the columns in the subtable in the ordering that you want or make
a column appear more than once just by passing to select() that column index more than once!.

Let's use the select() function to quickly generate 6 subtables from table_51 and table_53 and merge them together.
This is just to show you the possibilities out there, however, you can extend on it and provide measures for skipping empty records and all that jazz.

If generating your own merging protocol is preferrable you might want to loop through the tables, spliting each record into individual values and conditionally
select matching values that will be added to your new table. It'd prove nightmarish IF the tables don't have the same number of records for that matter hence
you could pad the original tables by adding empty records here and there to ensure that they have equal number of records.
Check the following conditional merge code listing.

When putting a smiley right before a closing parenthesis, do you:

Use two parentheses: (Like this: :) )
Use one parenthesis: (Like this: :)
Reverse direction of the smiley: (Like this: (: )
Use angle/square brackets instead of parentheses
Use C-style commenting to set the smiley off from the closing parenthesis
Make the smiley a dunce: (:>
I disapprove of emoticons
Other