i've also seen far worse code than that... at least you know what the code does...

the bottom line for me is that code has to be comprehensible at the end of the day. one-liners are pretty cool when it's throwaway/personal code, but if someone subjects me to having to read their deeply nested, ultra-idiomatic, highly !@##$$%%%^^^ punctuated, poorly thought-out chunk of code with no documentation then i am going to walk over to their desk and kick their butt ;-)

after all, personal style is personal style, but you can still be funky and clever if you don't use 5 lines instead of one...

as for the last code-chunk -- they appear to be saving their STDOUT in order to discard the output from something else. if indeed these lines occur as show without something after the 'close STDOUT' step, then i too am confused since they would (seem to) be accomplishing nothing.


In reply to RE: The inheritance of Cruft by d_i_r_t_y
in thread The inheritance of Cruft by kilinrax

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.