Or seen "Apocalypse Now" which was based upon Conrad's book. I basically feel a little like the Marlon Brando character to zigsters Martin Sheen. Not to say that I'm mad or that Perl and Perlmonks are akin to savages, far from it. But like the savages proving more effective than the U.S Special forces, Perl proves it's worth over programming languages on a daily basis.

This is one of the first lessons I picked up in a Perl coder rich environment: Perl is not wholly a scripting language and not entirely a programming language. As a result it doesn't sit entirely in the idiom of either. You will concede that the coding philosophies for these two differ?

I am upset by the slanderous comment about side effects, if I removed the return from the line of code you've quoted and relied on the fact that Perl returns the value of last item used in the sub-routine, then that would be a sort of side-effect (I prefer to call them features). If you really mean short-circuits, yes I've used them by the bucket-load, what of it? Of course if you dislike Perl's making things easy for you approach, there are other languages that are also interpretted where you can spend weeks doing the stuff that Perl does in a day.

I hold my hands up to the comments about all this code going on one line, so:

return join('', ( $v[0]->[$h], $h[!!$h], $and[!!($h&&($t||$u))] $v[!(1==$t&&($u+=10)&&($t=0))]->[$t], $format{'space'}, $v[0]->[$u] );

As to the lousy coding standards in this code. I can only assume that people have avoided it since ar0n pointed out that: lhoward has done this already. When I've finished this I'll be hitting CPAN to study his method. I suspect some people have refused to comment, from contempt of the bad style. I concur that it is not nice but it is far from illegible, some of it is made of Perl 'phrases' or 'clichés' that I picked up, and after a while you look at and go ah that's a ....

This isn't obfuscation, it's unkempt and written in a style too terse to be easily maintained 1. but in a language where the optimisation is a false economy 2.

1.) I am however hoping that the numeric sequence we use won't change in my life time ;o).
2.) I've done some tests with this, but too few to draw a positive conclusion, I suspect there are more legible ways, with less overheads. I'll see what lhoward did.

--
Brother Frankus.

In reply to Hmm, has anyone read Heart of Darkness? by frankus
in thread My Laptop talks to me. by frankus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.