Here’s mine: <img alt="beginner code c1998" src="/dumpster-fire.jpg"/>. But seriously, folks, I don’t have any handy… without trying to get an old drive to boot. I think this facsimile faithfully sums up the major issue(s) with my earliest production code and has much shorter line-wraps and better variable names to boot!

for my $what ( keys %should_have_been_an_array ) { for my $the ( keys %{$should_have_been_an_array->{$what}} ) { $some_magic_switch_used_later_probably = 1 if fullmoon($the->{ +halfmoon}); for my $hell ( keys %{$should_have_been_an_array->{$what}->{$t +he}} ) { my $readable = $should_have_been_an_array->{$what}->{$the} +->{$hell}; for my $are ( keys %{$readable} ) { for my $you ( keys %{$readable->{$are}} ) { my @sorted = _some_other_thing(%{$readable->{$are} +{$you}}); for my $doing ( @sorted ) { if ( $doing ) { # … } elsif ( $doing->{some_shim_not_in_the_actual_d +ata} || $should_have_been_an_array->{$what}{SK +IP} ) { # … } elsif ( $thirteen_elsifs_later_without_an_else + ) { # …

In reply to Re: What does your old Perl code look like? by Your Mother
in thread What does your old Perl code look like? by haukex

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.