Apart from the dubious educational value of one-liners,
I don't like this collection at all, for two reasons:
- It encourages
cargo cult programming
- A great deal of these exampels could be made much easier
using a database instead of plain text files. Even a minimalist
database such as SQLite would greatly simplify tasks such as "Calculate
sum of the nth column of tabular data" or "Calculate sum of a set of
columns for each row". I mean, if you need to sum up some values,
you need to read all the text anyway, so while you are reading it,
it makes sense to export the data into a database, and then get
the stats in no time.
Since they are ready-to-use recipes, it would have been more
useful to save each case into a well written Perl script, with
properly named variables, and using a database when needed.
The way it is now, it will just spread the rumor of Perl being
a write-only language.
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.