Oh I kept the first +20 line perl script I ever wrote to remind my self how bad it can get... 'twas a set of CGIs with all the greatest voodoo and cargo-cult programming.

When ever I get cocky I just pull that out and bring myself right back down. This is a nice one:

@call_history=$dbh->sql("select * from teamweb..CALLS where Userid='$u +serid'"); foreach $line (@call_history) { $havethey=@$line[0]; }

I was fuzzy on both SQL and arrayref nesting =) And this is from the REWRITE... I have been cured of the evil layout, btw. I haven't done anything bad enough recently to warrant a look at the original. Ahhh, 32kb of linear spaghetti code. =)

UPDATE: That bit with the STDOUT redirection still bothers me. I wonder if they have a format that they want to apply to STDOUT and that other SAVEOUT. If I read it right, they could use either handle and have one format work. Evil if that is what they are up to, otherwise I'd bet on a cargo-cult version of something similar. Maybe they redirect STDOUT later and just want to keep SAVEOUT around to bring it to life yet again later? Man that bugs me...

--
$you = new YOU;
honk() if $you->love(perl)


In reply to RE: The inheritance of Cruft by extremely
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.