in reply to use strict; before/after use warnings;

I usually write

use strict;
use warnings;

for purely aesthetic reasons.

For example, when I type a paragraph,
I sometimes pay attention to make sure
that lines become increasingly longer as
the paragraph is beginning, and the lines
become shorter as you get near the end.

See above example ^

When I write if-and-elsif chain, I do this:

   if (condition) { do something; }
elsif (condition) { do something; }
elsif (condition) { do something; }
else              { do something; }


It's easier to read.

Okay, call me OCD.

  • Comment on Re: use strict; before/after use warnings;

Replies are listed 'Best First'.
Re^2: use strict; before/after use warnings;
by vr (Curate) on Nov 07, 2019 at 13:30 UTC

    I agree. It occurred to me that if code reading is harder work than writing, then, on subconscious level, 1st line being shorter than the 2nd is perceived as gradual increase in amount of required effort, and so slightly less stress for a reader. So not only use strict; comes 1st, but, when I have to break too long line in two and there are no parts to align vertically, I'd prefer 1st line shorter and 2nd line longer, more often than not. As ridiculous as it is, when analysed logically.