<i>You may use this array to convert a number (in variable $num) from decimal to hex using base conversion formula:</i><p>Or, you could save yourself the energy and just write "sprintf '%x', $whatever"...<p>I'm also unsure of the value of treating everything as a one-liner. If your one-liner is "change foo to bar in all files in the directory", that's useful. If it's "find the length of an array", that's not so useful in the one-liner context. So why wrap every example with "perl -le ..."?<p>(If you want to play with Perl one line at a time, install Devel::REPL.)
Some of these are "obvious" to the Perl veteran but more because they're idiomatic than that they look like anything you'd see in another language, so this is great for relative Perl newbies. But even for the experience Perl hacker, there's a few clever items in there that make it worth a quick glance.
This is ugly to me<p><pre><code> $, = ",";
print ("a".."z");
</code></pre>
Why would you not use join()?<p><pre><code> print join(',',("a".."z"));</code></pre>